From f7685cef4c102f9def3235bd93d014ab106e8d55 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 16 Jan 2007 00:23:46 +0000 Subject: (cache_add): Record the failure to add to the cache. --- nscd/cache.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'nscd/cache.c') diff --git a/nscd/cache.c b/nscd/cache.c index e63a4f87df..73e7902cad 100644 --- a/nscd/cache.c +++ b/nscd/cache.c @@ -153,7 +153,10 @@ cache_add (int type, const void *key, size_t len, struct datahead *packet, newp = mempool_alloc (table, sizeof (struct hashentry)); /* If we cannot allocate memory, just do not do anything. */ if (newp == NULL) - return -1; + { + ++table->head->addfailed; + return -1; + } newp->type = type; newp->first = first; -- cgit v1.2.3