diff options
author | Roger Dingledine <arma@torproject.org> | 2006-12-09 19:40:16 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2006-12-09 19:40:16 +0000 |
commit | f7319a0b6dae56525fa3ba1d83c212bfe39483de (patch) | |
tree | f22066c84bd72fc83e57875828e77e51b0becb65 /src/or | |
parent | 32f37b3fb0aa995f954aea652fce9fe754c28f06 (diff) | |
download | tor-f7319a0b6dae56525fa3ba1d83c212bfe39483de.tar.gz tor-f7319a0b6dae56525fa3ba1d83c212bfe39483de.zip |
correction and cleanups on r9047
svn:r9060
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/circuitbuild.c | 2 | ||||
-rw-r--r-- | src/or/hibernate.c | 2 | ||||
-rw-r--r-- | src/or/or.h | 7 | ||||
-rw-r--r-- | src/or/rephist.c | 2 |
4 files changed, 7 insertions, 6 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c index cf50d71aad..cd1e952d45 100644 --- a/src/or/circuitbuild.c +++ b/src/or/circuitbuild.c @@ -2377,7 +2377,7 @@ entry_guards_parse_state(or_state_t *state, int set, char **msg) /** Our list of entry guards has changed, or some element of one * of our entry guards has changed. Write the changes to disk within - * the next 5 minutes. + * the next few minutes. */ static void entry_guards_changed(void) diff --git a/src/or/hibernate.c b/src/or/hibernate.c index 2063ccdbd2..774da51560 100644 --- a/src/or/hibernate.c +++ b/src/or/hibernate.c @@ -577,7 +577,7 @@ accounting_record_bandwidth_usage(time_t now, or_state_t *state) ROUND_UP(n_bytes_written_in_interval); state->AccountingSecondsActive = n_seconds_active_in_interval; state->AccountingExpectedUsage = expected_bandwidth_usage; - or_state_mark_dirty(state, 60); + or_state_mark_dirty(state, now+60); return r; } diff --git a/src/or/or.h b/src/or/or.h index d108ec41e4..2e885ad226 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -1663,7 +1663,7 @@ typedef struct { /** When was the state last written to disk? */ time_t LastWritten; - /** Fields for */ + /** Fields for accounting bandwidth use. */ time_t AccountingIntervalStart; uint64_t AccountingBytesReadInInterval; uint64_t AccountingBytesWrittenInInterval; @@ -1686,15 +1686,14 @@ typedef struct { int BWHistoryWriteInterval; smartlist_t *BWHistoryWriteValues; - /** What version of Tor write this state file? */ + /** What version of Tor wrote this state file? */ char *TorVersion; - /** holds any unrecognized values we found in the state file, in the order + /** Holds any unrecognized values we found in the state file, in the order * in which we found them. */ config_line_t *ExtraLines; } or_state_t; -static void or_state_mark_dirty(or_state_t *state, time_t when); /** Change the next_write time of <b>state</b> to <b>when</b>, unless the * state is already scheduled to be written to disk earlier than <b>when</b>. */ diff --git a/src/or/rephist.c b/src/or/rephist.c index 19b6ea23bf..c30583fe58 100644 --- a/src/or/rephist.c +++ b/src/or/rephist.c @@ -667,6 +667,8 @@ rep_hist_update_state(or_state_t *state) if (! server_mode(get_options())) { /* Clients don't need to store bandwidth history persistently; * force these values to the defaults. */ + /* FFFF we should pull the default out of config.c's state table, + * so we don't have two defaults. */ if (*s_begins != 0 || *s_interval != 900) or_state_mark_dirty(get_or_state(), time(NULL)+600); *s_begins = 0; |