]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
2161. [bug] Fix which log messages are emitted for 'rndc flush'.
authorMark Andrews <marka@isc.org>
Tue, 13 Mar 2007 04:30:17 +0000 (04:30 +0000)
committerMark Andrews <marka@isc.org>
Tue, 13 Mar 2007 04:30:17 +0000 (04:30 +0000)
                        [RT #16698]

CHANGES
bin/named/server.c

diff --git a/CHANGES b/CHANGES
index 2649a239f46e846de8de800024fb46f879f14bc9..8a5b1475e8d941368310b100ee46f0a1557bb07c 100644 (file)
--- 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]
 
index 647dfce63f55e645a8d6a85a0aeed75a1c1abef0..e93bd6411b10dee4d951b76639e1bb10c4525daa 100644 (file)
@@ -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;