mirror of
https://github.com/isc-projects/bind9.git
synced 2026-02-25 10:59:35 -05:00
The 'stopping command channel on 127.0.0.1#953' message could be printed
multiple times on shutdown.
This commit is contained in:
parent
f18701aeaf
commit
ed3418751e
1 changed files with 11 additions and 7 deletions
|
|
@ -15,7 +15,7 @@
|
|||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: controlconf.c,v 1.15 2001/07/05 17:01:40 gson Exp $ */
|
||||
/* $Id: controlconf.c,v 1.16 2001/07/05 18:39:14 bwelling Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
|
|
@ -187,9 +187,17 @@ maybe_free_connection(controlconnection_t *conn) {
|
|||
static void
|
||||
shutdown_listener(controllistener_t *listener) {
|
||||
isc_boolean_t destroy = ISC_TRUE;
|
||||
char socktext[ISC_SOCKADDR_FORMATSIZE];
|
||||
|
||||
listener->exiting = ISC_TRUE;
|
||||
if (!listener->exiting) {
|
||||
char socktext[ISC_SOCKADDR_FORMATSIZE];
|
||||
|
||||
isc_sockaddr_format(&listener->address, socktext,
|
||||
sizeof(socktext));
|
||||
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
|
||||
NS_LOGMODULE_CONTROL, ISC_LOG_NOTICE,
|
||||
"stopping command channel on %s", socktext);
|
||||
listener->exiting = ISC_TRUE;
|
||||
}
|
||||
|
||||
if (!ISC_LIST_EMPTY(listener->connections)) {
|
||||
controlconnection_t *conn;
|
||||
|
|
@ -206,10 +214,6 @@ shutdown_listener(controllistener_t *listener) {
|
|||
destroy = ISC_FALSE;
|
||||
}
|
||||
|
||||
isc_sockaddr_format(&listener->address, socktext, sizeof(socktext));
|
||||
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
|
||||
NS_LOGMODULE_CONTROL, ISC_LOG_NOTICE,
|
||||
"stopping command channel on %s", socktext);
|
||||
if (destroy)
|
||||
free_listener(listener);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue