aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--nscd/grpcache.c5
-rw-r--r--nscd/servicescache.c5
3 files changed, 12 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index b4d30ca..16187bb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-06-29 Ulrich Drepper <drepper@gmail.com>
+
+ * nscd/grpcache.c (cache_addgr): Don't write notfound reply if we
+ are re-adding the entry.
+ * nscd/servicescache.c (cache_addserv): Likewise.
+
2011-06-28 Ulrich Drepper <drepper@gmail.com>
[BZ #12935]
diff --git a/nscd/grpcache.c b/nscd/grpcache.c
index fa21929..0e7f81f 100644
--- a/nscd/grpcache.c
+++ b/nscd/grpcache.c
@@ -114,8 +114,9 @@ cache_addgr (struct database_dyn *db, int fd, request_header *req,
case. */
total = sizeof (notfound);
- written = TEMP_FAILURE_RETRY (send (fd, &notfound, total,
- MSG_NOSIGNAL));
+ if (fd != -1)
+ written = TEMP_FAILURE_RETRY (send (fd, &notfound, total,
+ MSG_NOSIGNAL));
dataset = mempool_alloc (db, sizeof (struct dataset) + req->key_len,
1);
diff --git a/nscd/servicescache.c b/nscd/servicescache.c
index 2dd1cc5..b0a2977 100644
--- a/nscd/servicescache.c
+++ b/nscd/servicescache.c
@@ -104,8 +104,9 @@ cache_addserv (struct database_dyn *db, int fd, request_header *req,
case. */
total = sizeof (notfound);
- written = TEMP_FAILURE_RETRY (send (fd, &notfound, total,
- MSG_NOSIGNAL));
+ if (fd != -1)
+ written = TEMP_FAILURE_RETRY (send (fd, &notfound, total,
+ MSG_NOSIGNAL));
dataset = mempool_alloc (db, sizeof (struct dataset) + req->key_len,
1);