diff options
Diffstat (limited to 'nscd/aicache.c')
-rw-r--r-- | nscd/aicache.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/nscd/aicache.c b/nscd/aicache.c index 6c8d83a7ad..b1369214ea 100644 --- a/nscd/aicache.c +++ b/nscd/aicache.c @@ -511,9 +511,15 @@ next_nip: if (fd != -1) TEMP_FAILURE_RETRY (send (fd, ¬found, total, MSG_NOSIGNAL)); - dataset = mempool_alloc (db, sizeof (struct dataset) + req->key_len, 1); /* If we cannot permanently store the result, so be it. */ - if (dataset != NULL) + if (db->negtimeout == 0) + { + /* Mark the old entry as obsolete. */ + if (dh != NULL) + dh->usable = false; + dataset = NULL; + } + else if ((dataset = mempool_alloc (db, sizeof (struct dataset) + req->key_len, 1)) != NULL) { dataset->head.allocsize = sizeof (struct dataset) + req->key_len; dataset->head.recsize = total; |