[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] [tor/master 2/7] Call the new config option ConnDirectionStatistics.
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date: Sun, 15 Aug 2010 14:58:35 +0200
Subject: Call the new config option ConnDirectionStatistics.
Commit: f56529b4b2226f2fde1ff75ee222edccca9d1591
---
src/or/config.c | 12 ++++++------
src/or/main.c | 2 +-
src/or/or.h | 2 +-
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 5ab4b46..cd6b0b0 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 8d98d3f..08a9313 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 c9e43fa..c5349ae 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 b612e9a..8c56bc4 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);
--
1.7.1