]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
dig now calls isc_mem_stats() only if -m was specified, not if
authorBrian Wellington <source@isc.org>
Fri, 13 Oct 2000 22:55:50 +0000 (22:55 +0000)
committerBrian Wellington <source@isc.org>
Fri, 13 Oct 2000 22:55:50 +0000 (22:55 +0000)
isc_mem_debugging was set elsewhere.

bin/dig/dig.c
bin/dig/dighost.c

index dc34a05bb363d99d8689919605e2ae11335176a0..2792f5c24c4a928f4d9e164bbc9e3ac2cacd1cbb 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: dig.c,v 1.112 2000/10/13 17:53:57 mws Exp $ */
+/* $Id: dig.c,v 1.113 2000/10/13 22:55:49 bwelling Exp $ */
 
 #include <config.h>
 #include <stdlib.h>
@@ -78,7 +78,7 @@ dig_lookup_t *default_lookup = NULL;
 extern isc_uint32_t name_limit;
 extern isc_uint32_t rr_limit;
 
-extern isc_boolean_t debugging, show_packets;
+extern isc_boolean_t debugging, memdebugging, show_packets;
 char *batchname = NULL;
 FILE *batchfp = NULL;
 char *argv0;
@@ -911,6 +911,7 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
                exit(0);
                break;
        case 'm':
+               memdebugging = ISC_TRUE;
                isc_mem_debugging = ISC_MEM_DEBUGTRACE | ISC_MEM_DEBUGRECORD;
                return (ISC_FALSE);
        case 'n':
index eac7dc65acea31959041542ae5d8cf9427b00e03..ef934766f5e061b9507d08038667062ce5e44b6c 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: dighost.c,v 1.144 2000/10/13 17:53:58 mws Exp $ */
+/* $Id: dighost.c,v 1.145 2000/10/13 22:55:50 bwelling Exp $ */
 
 /*
  * Notice to programmers:  Do not use this code as an example of how to
@@ -118,6 +118,7 @@ isc_boolean_t validated = ISC_TRUE;
 isc_entropy_t *entp = NULL;
 isc_mempool_t *commctx = NULL;
 isc_boolean_t debugging = ISC_FALSE;
+isc_boolean_t memdebugging = ISC_FALSE;
 char *progname = NULL;
 isc_mutex_t lookup_lock;
 dig_lookup_t *current_lookup = NULL;
@@ -2711,7 +2712,7 @@ destroy_libs(void) {
 
        UNLOCK_LOOKUP;
        DESTROYLOCK(&lookup_lock);
-       if (isc_mem_debugging != 0)
+       if (memdebugging)
                isc_mem_stats(mctx, stderr);
        if (mctx != NULL)
                isc_mem_destroy(&mctx);