summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2013-03-27 21:07:36 -0400
committerNick Mathewson <nickm@torproject.org>2013-03-27 21:07:36 -0400
commiteb9b282cc24da6ff1e776ea02f94571e3e3f7017 (patch)
tree2ae6af5b0d5ec2b08dd87de91a6bf2cbaecfdd17
parente62b8051ee37f12c48205b8266745f02b0d5389f (diff)
parent7f8098d2d0e719f3ea9e35a7f930477f8fc7682a (diff)
downloadtor-eb9b282cc24da6ff1e776ea02f94571e3e3f7017.tar.gz
tor-eb9b282cc24da6ff1e776ea02f94571e3e3f7017.zip
Merge remote-tracking branch 'origin/maint-0.2.4'
-rw-r--r--changes/bug65724
-rw-r--r--changes/bug85986
-rw-r--r--src/or/circuitbuild.c3
-rw-r--r--src/or/circuitstats.c10
-rw-r--r--src/or/circuituse.c2
5 files changed, 19 insertions, 6 deletions
diff --git a/changes/bug6572 b/changes/bug6572
new file mode 100644
index 0000000000..6508d1bcb5
--- /dev/null
+++ b/changes/bug6572
@@ -0,0 +1,4 @@
+ o Minor bugfixes (log messages)
+ - Use circuit creation time for network liveness evaluation. This
+ should eliminate warning log messages about liveness caused by
+ changes in timeout evaluation. Fixes bug 6572; bugfix on 0.2.4.8-alpha.
diff --git a/changes/bug8598 b/changes/bug8598
new file mode 100644
index 0000000000..e31c8f3c74
--- /dev/null
+++ b/changes/bug8598
@@ -0,0 +1,6 @@
+ o Bugfixes:
+ - Fix compilation warning with some versions of clang that would prefer
+ the -Wswitch-enum compiler flag to warn about switch statements with
+ missing enum values, even if those switch statements have a default:
+ statement. Fixes bug 8598; bugfix on 0.2.4.10-alpha.
+
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index ce552b47f4..aec6c6acf2 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -2010,6 +2010,9 @@ pathbias_check_close(origin_circuit_t *ocirc, int reason)
pathbias_count_use_failed(ocirc);
break;
+ case PATH_STATE_NEW_CIRC:
+ case PATH_STATE_BUILD_ATTEMPTED:
+ case PATH_STATE_ALREADY_COUNTED:
default:
// Other states are uninteresting. No stats to count.
break;
diff --git a/src/or/circuitstats.c b/src/or/circuitstats.c
index fe9c80ddce..1d7812bf2b 100644
--- a/src/or/circuitstats.c
+++ b/src/or/circuitstats.c
@@ -1232,11 +1232,11 @@ circuit_build_times_network_close(circuit_build_times_t *cbt,
format_local_iso_time(last_live_buf, cbt->liveness.network_last_live);
format_local_iso_time(start_time_buf, start_time);
format_local_iso_time(now_buf, now);
- log_warn(LD_BUG,
- "Circuit somehow completed a hop while the network was "
- "not live. Network was last live at %s, but circuit launched "
- "at %s. It's now %s.", last_live_buf, start_time_buf,
- now_buf);
+ log_notice(LD_CIRC,
+ "A circuit somehow completed a hop while the network was "
+ "not live. The network was last live at %s, but the circuit "
+ "launched at %s. It's now %s. This could mean your clock "
+ "changed.", last_live_buf, start_time_buf, now_buf);
}
cbt->liveness.nonlive_timeouts++;
if (cbt->liveness.nonlive_timeouts == 1) {
diff --git a/src/or/circuituse.c b/src/or/circuituse.c
index f02597e630..14576f13d6 100644
--- a/src/or/circuituse.c
+++ b/src/or/circuituse.c
@@ -671,7 +671,7 @@ circuit_expire_building(void)
circuit_purpose_to_string(victim->purpose));
} else if (circuit_build_times_count_close(&circ_times,
first_hop_succeeded,
- victim->timestamp_began.tv_sec)) {
+ victim->timestamp_created.tv_sec)) {
circuit_build_times_set_timeout(&circ_times);
}
}