summaryrefslogtreecommitdiff
path: root/nscd/grpcache.c
diff options
context:
space:
mode:
Diffstat (limited to 'nscd/grpcache.c')
-rw-r--r--nscd/grpcache.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/nscd/grpcache.c b/nscd/grpcache.c
index e9607c6f11..a698f363c7 100644
--- a/nscd/grpcache.c
+++ b/nscd/grpcache.c
@@ -1,5 +1,5 @@
/* Cache handling for group lookup.
- Copyright (C) 1998-2008, 2009, 2011 Free Software Foundation, Inc.
+ Copyright (C) 1998-2008, 2009, 2011, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
@@ -120,8 +120,9 @@ cache_addgr (struct database_dyn *db, int fd, request_header *req,
else
written = total;
- /* If we cannot permanently store the result, so be it. */
- if (db->negtimeout == 0)
+ /* If we have a transient error or cannot permanently store
+ the result, so be it. */
+ if (errno == EAGAIN || __builtin_expect (db->negtimeout == 0, 0))
{
/* Mark the old entry as obsolete. */
if (dh != NULL)