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

[or-cvs] r11437: Do not load state when options->command is not RUN_TOR. (Res (in tor/trunk: . doc src/or)



Author: nickm
Date: 2007-09-13 13:01:08 -0400 (Thu, 13 Sep 2007)
New Revision: 11437

Modified:
   tor/trunk/
   tor/trunk/ChangeLog
   tor/trunk/doc/TODO
   tor/trunk/src/or/config.c
Log:
 r14425@Kushana:  nickm | 2007-09-13 13:00:57 -0400
 Do not load state when options->command is not RUN_TOR. (Resolves bug 499; backport candidate)



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r14425] on c95137ef-5f19-0410-b913-86e773d04f59

Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog	2007-09-12 23:21:29 UTC (rev 11436)
+++ tor/trunk/ChangeLog	2007-09-13 17:01:08 UTC (rev 11437)
@@ -36,6 +36,9 @@
       a way to trigger this remotely.)
     - Fix a memory leak when freeing incomplete requests from DNSPort.
       (Found by Niels Provos with valgrind.)
+    - Don't try to access (or alter) the state file when running
+      --list-fingerprint or --verify-config or --hash-password. (Resolves
+      bug 499.)
 
   o Code simplifications and refactoring:
     - Revamp file-writing logic so we don't need to have the entire contents

Modified: tor/trunk/doc/TODO
===================================================================
--- tor/trunk/doc/TODO	2007-09-12 23:21:29 UTC (rev 11436)
+++ tor/trunk/doc/TODO	2007-09-13 17:01:08 UTC (rev 11437)
@@ -103,7 +103,7 @@
       extra-stable case.
     - Streamline how we pick entry nodes: Make choose_random_entry() have
       less magic and less control logic.
-    - Maybe move NT services into their own module.
+    o Maybe move NT services into their own module.
     - Refactor networkstatus generation:
       - Include "v" line in getinfo values.
 

Modified: tor/trunk/src/or/config.c
===================================================================
--- tor/trunk/src/or/config.c	2007-09-12 23:21:29 UTC (rev 11436)
+++ tor/trunk/src/or/config.c	2007-09-13 17:01:08 UTC (rev 11437)
@@ -1007,13 +1007,10 @@
   }
 
   /* Load state */
-  if (! global_state) {
+  if (! global_state && options->command == CMD_RUN_TOR) {
     if (or_state_load())
       return -1;
-
-    /* XXXX020 make this conditional? */
-    if (options->command == CMD_RUN_TOR)
-      rep_hist_load_mtbf_data(time(NULL));
+    rep_hist_load_mtbf_data(time(NULL));
   }
 
   /* Bail out at this point if we're not going to be a client or server: