From b5f690e1618cffeec15b3bcb9525443206fb7007 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 13 Mar 2007 04:30:17 +0000 Subject: [PATCH] 2161. [bug] Fix which log messages are emitted for 'rndc flush'. [RT #16698] --- CHANGES | 3 +++ bin/named/server.c | 11 +++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/CHANGES b/CHANGES index 2649a239f4..8a5b1475e8 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +2161. [bug] Fix which log messages are emitted for 'rndc flush'. + [RT #16698] + 2160. [bug] libisc wasn't handling NULL ifa_addr pointers returned from getifaddrs(). [RT #16708] diff --git a/bin/named/server.c b/bin/named/server.c index 647dfce63f..e93bd6411b 100644 --- a/bin/named/server.c +++ b/bin/named/server.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: server.c,v 1.478 2007/02/26 02:19:45 marka Exp $ */ +/* $Id: server.c,v 1.479 2007/03/13 04:30:17 marka Exp $ */ /*! \file */ @@ -4816,7 +4816,7 @@ isc_result_t ns_server_flushcache(ns_server_t *server, char *args) { char *ptr, *viewname; dns_view_t *view; - isc_boolean_t flushed = ISC_FALSE; + isc_boolean_t flushed; isc_result_t result; /* Skip the command name. */ @@ -4829,6 +4829,7 @@ ns_server_flushcache(ns_server_t *server, char *args) { result = isc_task_beginexclusive(server->task); RUNTIME_CHECK(result == ISC_R_SUCCESS); + flushed = ISC_TRUE; for (view = ISC_LIST_HEAD(server->viewlist); view != NULL; view = ISC_LIST_NEXT(view, link)) @@ -4837,13 +4838,12 @@ ns_server_flushcache(ns_server_t *server, char *args) { continue; result = dns_view_flushcache(view); if (result != ISC_R_SUCCESS) { + flushed = ISC_FALSE; isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_SERVER, ISC_LOG_ERROR, "flushing cache in view '%s' failed: %s", view->name, isc_result_totext(result)); - goto out; } - flushed = ISC_TRUE; } if (flushed) { if (viewname != NULL) @@ -4859,7 +4859,6 @@ ns_server_flushcache(ns_server_t *server, char *args) { } else { result = ISC_R_FAILURE; } - out: isc_task_endexclusive(server->task); return (result); } @@ -4868,7 +4867,7 @@ isc_result_t ns_server_flushname(ns_server_t *server, char *args) { char *ptr, *target, *viewname; dns_view_t *view; - isc_boolean_t flushed = ISC_FALSE; + isc_boolean_t flushed; isc_result_t result; isc_buffer_t b; dns_fixedname_t fixed;