summaryrefslogtreecommitdiff
path: root/nscd/nscd_getai.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2005-02-08 10:05:09 +0000
committerJakub Jelinek <jakub@redhat.com>2005-02-08 10:05:09 +0000
commitd585b66fa4d11059948f466c9080a6826932358d (patch)
tree8b06692920852c297635b46a7d616c3066f95fac /nscd/nscd_getai.c
parente7cbcee4982d8caa809a91c9cfef5fda67445f0a (diff)
Updated to fedora-glibc-20050208T0948cvs/fedora-glibc-2_3_4-6
Diffstat (limited to 'nscd/nscd_getai.c')
-rw-r--r--nscd/nscd_getai.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/nscd/nscd_getai.c b/nscd/nscd_getai.c
index 24b374b0dc..866f7b2a5f 100644
--- a/nscd/nscd_getai.c
+++ b/nscd/nscd_getai.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2004.
@@ -78,7 +78,7 @@ __nscd_getai (const char *key, struct nscd_ai_result **result, int *h_errnop)
sizeof (ai_resp_mem));
if (sock == -1)
{
- /* nscd not running or wrong version or hosts caching disabled. */
+ /* nscd not running or wrong version. */
__nss_not_use_nscd_hosts = 1;
goto out;
}
@@ -151,6 +151,13 @@ __nscd_getai (const char *key, struct nscd_ai_result **result, int *h_errnop)
}
else
{
+ if (__builtin_expect (ai_resp->found == -1, 0))
+ {
+ /* The daemon does not cache this database. */
+ __nss_not_use_nscd_hosts = 1;
+ goto out_close;
+ }
+
/* Store the error number. */
*h_errnop = ai_resp->error;