diff options
author | Karsten Loesing <karsten.loesing@gmx.net> | 2010-08-15 14:58:35 +0200 |
---|---|---|
committer | Karsten Loesing <karsten.loesing@gmx.net> | 2010-12-03 16:47:52 +0100 |
commit | f56529b4b2226f2fde1ff75ee222edccca9d1591 (patch) | |
tree | 70904ebf65aeaa836edff8664f34594d8531ec32 | |
parent | 5dfdf075ac0cb3df66443011d3faa2c95dc53629 (diff) | |
download | tor-f56529b4b2226f2fde1ff75ee222edccca9d1591.tar.gz tor-f56529b4b2226f2fde1ff75ee222edccca9d1591.zip |
Call the new config option ConnDirectionStatistics.
-rw-r--r-- | src/or/config.c | 12 | ||||
-rw-r--r-- | src/or/main.c | 2 | ||||
-rw-r--r-- | src/or/or.h | 2 | ||||
-rw-r--r-- | src/or/router.c | 2 |
4 files changed, 9 insertions, 9 deletions
diff --git a/src/or/config.c b/src/or/config.c index 5ab4b46d5f..cd6b0b0c3c 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -200,7 +200,7 @@ static config_var_t _option_vars[] = { V(ClientOnly, BOOL, "0"), V(ConsensusParams, STRING, NULL), V(ConnLimit, UINT, "1000"), - V(ConnStatistics, BOOL, "0"), + V(ConnDirectionStatistics, BOOL, "0"), V(ConstrainedSockets, BOOL, "0"), V(ConstrainedSockSize, MEMUNIT, "8192"), V(ContactInfo, STRING, NULL), @@ -1393,7 +1393,7 @@ options_act(or_options_t *old_options) if (options->CellStatistics || options->DirReqStatistics || options->EntryStatistics || options->ExitPortStatistics || - options->ConnStatistics) { + options->ConnDirectionStatistics) { time_t now = time(NULL); if ((!old_options || !old_options->CellStatistics) && options->CellStatistics) @@ -1407,8 +1407,8 @@ options_act(or_options_t *old_options) if ((!old_options || !old_options->ExitPortStatistics) && options->ExitPortStatistics) rep_hist_exit_stats_init(now); - if ((!old_options || !old_options->ConnStatistics) && - options->ConnStatistics) + if ((!old_options || !old_options->ConnDirectionStatistics) && + options->ConnDirectionStatistics) rep_hist_conn_stats_init(now); if (!old_options) log_notice(LD_CONFIG, "Configured to measure statistics. Look for " @@ -1428,8 +1428,8 @@ options_act(or_options_t *old_options) if (old_options && old_options->ExitPortStatistics && !options->ExitPortStatistics) rep_hist_exit_stats_term(); - if (old_options && old_options->ConnStatistics && - !options->ConnStatistics) + if (old_options && old_options->ConnDirectionStatistics && + !options->ConnDirectionStatistics) rep_hist_conn_stats_term(); /* Check if we need to parse and add the EntryNodes config option. */ diff --git a/src/or/main.c b/src/or/main.c index 8d98d3f732..08a93133ef 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -1204,7 +1204,7 @@ run_scheduled_events(time_t now) if (next_write && next_write < next_time_to_write_stats_files) next_time_to_write_stats_files = next_write; } - if (options->ConnStatistics) { + if (options->ConnDirectionStatistics) { time_t next_write = rep_hist_conn_stats_write(time_to_write_stats_files); if (next_write && next_write < next_time_to_write_stats_files) next_time_to_write_stats_files = next_write; diff --git a/src/or/or.h b/src/or/or.h index c9e43fa15d..c5349aed55 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -2895,7 +2895,7 @@ typedef struct { int ExitPortStatistics; /** If true, the user wants us to collect connection statistics. */ - int ConnStatistics; + int ConnDirectionStatistics; /** If true, the user wants us to collect cell statistics. */ int CellStatistics; diff --git a/src/or/router.c b/src/or/router.c index b612e9a7fb..8c56bc49a9 100644 --- a/src/or/router.c +++ b/src/or/router.c @@ -2051,7 +2051,7 @@ extrainfo_dump_to_string(char **s_out, extrainfo_t *extrainfo, "exit-stats-end", now, &contents) > 0) { smartlist_add(chunks, contents); } - if (options->ConnStatistics && + if (options->ConnDirectionStatistics && load_stats_file("stats"PATH_SEPARATOR"conn-stats", "conn-stats-end", now, &contents) > 0) { size_t pos = strlen(s); |