[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r14199: Initialize logging before we log anything. Bugfix on 0.2.0.x (in tor/trunk: . src/or)



Author: nickm
Date: 2008-03-26 13:25:16 -0400 (Wed, 26 Mar 2008)
New Revision: 14199

Modified:
   tor/trunk/
   tor/trunk/ChangeLog
   tor/trunk/src/or/main.c
Log:
 r19066@catbus:  nickm | 2008-03-26 13:24:15 -0400
 Initialize logging before we log anything.  Bugfix on 0.2.0.x-alpha.



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r19066] on 8246c3cf-6607-4228-993b-4d95d33730f1

Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog	2008-03-26 17:20:24 UTC (rev 14198)
+++ tor/trunk/ChangeLog	2008-03-26 17:25:16 UTC (rev 14199)
@@ -11,6 +11,8 @@
     - Fix the implementation of ClientDNSRejectInternalAddresses so that it
       actually works, and doesn't warn about every single reverse lookup.
       Fixes the other part of bug 617.  Bugfix on 0.2.0.1-alpha.
+    - Initialize log mutex before initializing dmalloc.  Otherwise,
+      running with dmalloc would crash. Bugfix on 0.2.0.x-alpha.
 
   o Minor features:
     - Allow separate log levels to be configured for different logging

Modified: tor/trunk/src/or/main.c
===================================================================
--- tor/trunk/src/or/main.c	2008-03-26 17:20:24 UTC (rev 14198)
+++ tor/trunk/src/or/main.c	2008-03-26 17:25:16 UTC (rev 14199)
@@ -1963,12 +1963,12 @@
 tor_main(int argc, char *argv[])
 {
   int result = 0;
+  init_logging();
 #ifdef USE_DMALLOC
   int r = CRYPTO_set_mem_ex_functions(_tor_malloc, _tor_realloc,
                                       _tor_dmalloc_free);
   log_notice(LD_CONFIG, "Set up dmalloc; returned %d", r);
 #endif
-  init_logging();
 #ifdef NT_SERVICE
   {
      int done = 0;