diff options
author | Andreas Schwab <schwab@redhat.com> | 2010-04-12 13:40:20 +0200 |
---|---|---|
committer | Andreas Schwab <schwab@redhat.com> | 2010-04-12 13:40:20 +0200 |
commit | 1fd194fb757480a11ebd877e17dd627c90d76dd1 (patch) | |
tree | 9ad22d95dd8673bc036d14b0055a8dcd6febe09e /nscd | |
parent | 4ac4e460b116fb6da6e80124f4c4f6968eb86341 (diff) | |
parent | ea42a20caed5b343ff20a0d4622ae6c17b77161b (diff) |
Merge remote branch 'origin/master' into fedora/master
Diffstat (limited to 'nscd')
-rw-r--r-- | nscd/aicache.c | 10 | ||||
-rw-r--r-- | nscd/nscd_stat.c | 9 |
2 files changed, 12 insertions, 7 deletions
diff --git a/nscd/aicache.c b/nscd/aicache.c index 992357d2fe..3cb2208035 100644 --- a/nscd/aicache.c +++ b/nscd/aicache.c @@ -1,5 +1,5 @@ /* Cache handling for host lookup. - Copyright (C) 2004-2008, 2009 Free Software Foundation, Inc. + Copyright (C) 2004-2008, 2009, 2010 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2004. @@ -111,7 +111,7 @@ addhstaiX (struct database_dyn *db, int fd, request_header *req, int old_res_options = _res.options; _res.options &= ~RES_USE_INET6; - size_t tmpbuf6len = 512; + size_t tmpbuf6len = 1024; char *tmpbuf6 = alloca (tmpbuf6len); size_t tmpbuf4len = 0; char *tmpbuf4 = NULL; @@ -133,9 +133,11 @@ addhstaiX (struct database_dyn *db, int fd, request_header *req, "gethostbyname4_r"); if (fct4 != NULL) { - struct gaih_addrtuple *at = NULL; + struct gaih_addrtuple atmem; + struct gaih_addrtuple *at; while (1) { + at = &atmem; rc6 = 0; herrno = 0; status[1] = DL_CALL_FCT (fct4, (key, &at, tmpbuf6, tmpbuf6len, @@ -153,7 +155,7 @@ addhstaiX (struct database_dyn *db, int fd, request_header *req, goto next_nip; /* We found the data. Count the addresses and the size. */ - for (const struct gaih_addrtuple *at2 = at; at2 != NULL; + for (const struct gaih_addrtuple *at2 = at = &atmem; at2 != NULL; at2 = at2->next) { ++naddrs; diff --git a/nscd/nscd_stat.c b/nscd/nscd_stat.c index 7f6bd1c83e..658fd56fa3 100644 --- a/nscd/nscd_stat.c +++ b/nscd/nscd_stat.c @@ -1,4 +1,4 @@ -/* Copyright (c) 1998, 2003, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (c) 1998, 2003, 2004, 2005, 2010 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1998. @@ -80,6 +80,7 @@ struct statdata int max_nthreads; int paranoia; time_t restart_interval; + unsigned int reload_count; int ndbs; struct dbstat dbs[lastdb]; #ifdef HAVE_SELINUX @@ -102,6 +103,7 @@ send_stats (int fd, struct database_dyn dbs[lastdb]) data.max_nthreads = max_nthreads; data.paranoia = paranoia; data.restart_interval = restart_interval; + data.reload_count = reload_count; data.ndbs = lastdb; for (cnt = 0; cnt < lastdb; ++cnt) @@ -240,10 +242,11 @@ receive_print_stats (void) "%15d maximum number of threads\n" "%15lu number of times clients had to wait\n" "%15s paranoia mode enabled\n" - "%15lu restart internal\n"), + "%15lu restart internal\n" + "%15u reload count\n"), data.nthreads, data.max_nthreads, data.client_queued, data.paranoia ? yesstr : nostr, - (unsigned long int) data.restart_interval); + (unsigned long int) data.restart_interval, data.reload_count); for (i = 0; i < lastdb; ++i) { |