]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Global memory context had the wrong name (RT #17932)
authorTatuya JINMEI 神明達哉 <jinmei@isc.org>
Thu, 3 Apr 2008 23:14:52 +0000 (23:14 +0000)
committerTatuya JINMEI 神明達哉 <jinmei@isc.org>
Thu, 3 Apr 2008 23:14:52 +0000 (23:14 +0000)
bin/named/main.c
lib/dns/resolver.c

index 4af0a5176898c42c2681ae18af192f22d8dfff06..50a44343e776f2052b74e3c25080b0f1446604e1 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: main.c,v 1.161 2008/01/18 23:46:57 tbox Exp $ */
+/* $Id: main.c,v 1.162 2008/04/03 23:14:52 jinmei Exp $ */
 
 /*! \file */
 
@@ -878,6 +878,7 @@ main(int argc, char *argv[]) {
        if (result != ISC_R_SUCCESS)
                ns_main_earlyfatal("isc_mem_create() failed: %s",
                                   isc_result_totext(result));
+       isc_mem_setname(ns_g_mctx, "main", NULL);
 
        setup();
 
index 5d6bc1a0738d5f3b0756e7d00a1959e4f37300f4..9011eb843636a57c1edcae52861ec38305f2a094 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: resolver.c,v 1.365 2008/04/03 05:55:52 marka Exp $ */
+/* $Id: resolver.c,v 1.366 2008/04/03 23:14:52 jinmei Exp $ */
 
 /*! \file */
 
@@ -6505,6 +6505,7 @@ dns_resolver_create(dns_view_t *view,
                        goto cleanup_buckets;
                }
                res->buckets[i].mctx = NULL;
+               snprintf(name, sizeof(name), "res%u", i);
 #ifdef ISC_PLATFORM_USETHREADS
                /*
                 * Use a separate memory context for each bucket to reduce
@@ -6517,12 +6518,11 @@ dns_resolver_create(dns_view_t *view,
                        DESTROYLOCK(&res->buckets[i].lock);
                        goto cleanup_buckets;
                }
+               isc_mem_setname(res->buckets[i].mctx, name, NULL);
 #else
                isc_mem_attach(view->mctx, &res->buckets[i].mctx);
 #endif
-               snprintf(name, sizeof(name), "res%u", i);
                isc_task_setname(res->buckets[i].task, name, res);
-               isc_mem_setname(res->buckets[i].mctx, name, NULL);
                ISC_LIST_INIT(res->buckets[i].fctxs);
                res->buckets[i].exiting = ISC_FALSE;
                buckets_created++;