about summary refs log tree commit diff
path: root/nscd
diff options
context:
space:
mode:
Diffstat (limited to 'nscd')
-rw-r--r--nscd/grpcache.c2
-rw-r--r--nscd/hstcache.c2
-rw-r--r--nscd/initgrcache.c4
-rw-r--r--nscd/pwdcache.c2
-rw-r--r--nscd/servicescache.c2
5 files changed, 11 insertions, 1 deletions
diff --git a/nscd/grpcache.c b/nscd/grpcache.c
index 9cb6105f3c..002f04fb3e 100644
--- a/nscd/grpcache.c
+++ b/nscd/grpcache.c
@@ -285,6 +285,8 @@ cache_addgr (struct database_dyn *db, int fd, request_header *req,
 		  dataset = memcpy (newp, dataset, total + n);
 		  alloca_used = false;
 		}
+	      else
+		++db->head->addfailed;
 
 	      /* Mark the old record as obsolete.  */
 	      dh->usable = false;
diff --git a/nscd/hstcache.c b/nscd/hstcache.c
index c93691dcfd..cc041581e1 100644
--- a/nscd/hstcache.c
+++ b/nscd/hstcache.c
@@ -325,6 +325,8 @@ cache_addhst (struct database_dyn *db, int fd, request_header *req,
 		      dataset = memcpy (newp, dataset, total + req->key_len);
 		      alloca_used = false;
 		    }
+		  else
+		    ++db->head->addfailed;
 		}
 
 	      /* Mark the old record as obsolete.  */
diff --git a/nscd/initgrcache.c b/nscd/initgrcache.c
index bb4ac37efc..157cd7860c 100644
--- a/nscd/initgrcache.c
+++ b/nscd/initgrcache.c
@@ -110,7 +110,7 @@ addinitgroupsX (struct database_dyn *db, int fd, request_header *req,
   bool all_tryagain = true;
   bool any_success = false;
 
-  /* This is temporary memory, we need not (ad must not) call
+  /* This is temporary memory, we need not (and must not) call
      mempool_alloc.  */
   // XXX This really should use alloca.  need to change the backends.
   gid_t *groups = (gid_t *) malloc (size * sizeof (gid_t));
@@ -338,6 +338,8 @@ addinitgroupsX (struct database_dyn *db, int fd, request_header *req,
 		  dataset = memcpy (newp, dataset, total + req->key_len);
 		  alloca_used = false;
 		}
+	      else
+		++db->head->addfailed;
 
 	      /* Mark the old record as obsolete.  */
 	      dh->usable = false;
diff --git a/nscd/pwdcache.c b/nscd/pwdcache.c
index 51ea113476..bc1b6bab2f 100644
--- a/nscd/pwdcache.c
+++ b/nscd/pwdcache.c
@@ -280,6 +280,8 @@ cache_addpw (struct database_dyn *db, int fd, request_header *req,
 		  dataset = memcpy (newp, dataset, total + n);
 		  alloca_used = false;
 		}
+	      else
+		++db->head->addfailed;
 
 	      /* Mark the old record as obsolete.  */
 	      dh->usable = false;
diff --git a/nscd/servicescache.c b/nscd/servicescache.c
index d6bf51d29f..e122cb3f16 100644
--- a/nscd/servicescache.c
+++ b/nscd/servicescache.c
@@ -272,6 +272,8 @@ cache_addserv (struct database_dyn *db, int fd, request_header *req,
 		  dataset = memcpy (newp, dataset, total + req->key_len);
 		  alloca_used = false;
 		}
+	      else
+		++db->head->addfailed;
 
 	      /* Mark the old record as obsolete.  */
 	      dh->usable = false;