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)


svn:r11437
This commit is contained in:
Nick Mathewson 2007-09-13 17:01:08 +00:00
parent 9b1ad0074b
commit 5fcc48d389
3 changed files with 6 additions and 6 deletions

View File

@ -36,6 +36,9 @@ Changes in version 0.2.0.7-alpha - 2007-??-??
a way to trigger this remotely.) a way to trigger this remotely.)
- Fix a memory leak when freeing incomplete requests from DNSPort. - Fix a memory leak when freeing incomplete requests from DNSPort.
(Found by Niels Provos with valgrind.) (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: o Code simplifications and refactoring:
- Revamp file-writing logic so we don't need to have the entire contents - Revamp file-writing logic so we don't need to have the entire contents

View File

@ -103,7 +103,7 @@ Things we'd like to do in 0.2.0.x:
extra-stable case. extra-stable case.
- Streamline how we pick entry nodes: Make choose_random_entry() have - Streamline how we pick entry nodes: Make choose_random_entry() have
less magic and less control logic. 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: - Refactor networkstatus generation:
- Include "v" line in getinfo values. - Include "v" line in getinfo values.

View File

@ -1007,13 +1007,10 @@ options_act(or_options_t *old_options)
} }
/* Load state */ /* Load state */
if (! global_state) { if (! global_state && options->command == CMD_RUN_TOR) {
if (or_state_load()) if (or_state_load())
return -1; return -1;
rep_hist_load_mtbf_data(time(NULL));
/* XXXX020 make this conditional? */
if (options->command == CMD_RUN_TOR)
rep_hist_load_mtbf_data(time(NULL));
} }
/* Bail out at this point if we're not going to be a client or server: /* Bail out at this point if we're not going to be a client or server: