[or-cvs] r11264: make the last patch do what i actually want. it was a bit tr (tor/trunk/src/or)
arma at seul.org
arma at seul.org
Fri Aug 24 08:12:25 UTC 2007
Author: arma
Date: 2007-08-24 04:12:25 -0400 (Fri, 24 Aug 2007)
New Revision: 11264
Modified:
tor/trunk/src/or/config.c
Log:
make the last patch do what i actually want. it was a bit tricky
since we want the default guardversion to be 0 (which is what it is
if there's no guardversion line), yet when we're validating a freshly
configed and defaulted state, we don't want to complain.
Modified: tor/trunk/src/or/config.c
===================================================================
--- tor/trunk/src/or/config.c 2007-08-24 08:01:47 UTC (rev 11263)
+++ tor/trunk/src/or/config.c 2007-08-24 08:12:25 UTC (rev 11264)
@@ -4357,7 +4357,7 @@
(void) from_setconf;
(void) old_state;
- if (state->GuardVersion < RECOMMENDED_GUARD_VERSION) {
+ if (state->EntryGuards && state->GuardVersion < RECOMMENDED_GUARD_VERSION) {
config_free_lines(state->EntryGuards);
state->EntryGuards = NULL;
log_notice(LD_CONFIG, "Detected state file from old version '%s'. "
@@ -4524,6 +4524,7 @@
len = strlen(get_version())+8;
global_state->TorVersion = tor_malloc(len);
tor_snprintf(global_state->TorVersion, len, "Tor %s", get_version());
+ global_state->GuardVersion = RECOMMENDED_GUARD_VERSION;
state = config_dump(&state_format, global_state, 1, 0);
len = strlen(state)+256;
More information about the tor-commits
mailing list