From 3e1aa84e7f9f38815f5db9cd7654b1a9497cf6e4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 20 Jan 2012 22:39:54 -0500 Subject: Do not cache negative results in nscd if these are transient --- nscd/initgrcache.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'nscd/initgrcache.c') diff --git a/nscd/initgrcache.c b/nscd/initgrcache.c index 4ac9942aeb..2019991d28 100644 --- a/nscd/initgrcache.c +++ b/nscd/initgrcache.c @@ -1,5 +1,5 @@ /* Cache handling for host lookup. - Copyright (C) 2004-2006, 2008, 2009, 2011 Free Software Foundation, Inc. + Copyright (C) 2004-2006, 2008, 2009, 2011, 2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2004. @@ -202,8 +202,9 @@ addinitgroupsX (struct database_dyn *db, int fd, request_header *req, written = TEMP_FAILURE_RETRY (send (fd, ¬found, total, MSG_NOSIGNAL)); - /* If we cannot permanently store the result, so be it. */ - if (__builtin_expect (db->negtimeout == 0, 0)) + /* If we have a transient error or cannot permanently store + the result, so be it. */ + if (all_tryagain || __builtin_expect (db->negtimeout == 0, 0)) { /* Mark the old entry as obsolete. */ if (dh != NULL) -- cgit 1.4.1