summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-04-28 20:05:48 -0400
committerNick Mathewson <nickm@torproject.org>2011-04-28 20:05:48 -0400
commitbb8689b86480d81aa150d5f27fa830afc4de4077 (patch)
tree8491336b47c2b4a2a2e8e96e7035fdc5b6ea4628
parentf38ecd5ac0f21d25c838be6004925372d26a45aa (diff)
parentc12289792507c8dd51c2a947f7c910c70df4dd3d (diff)
downloadtor-bb8689b86480d81aa150d5f27fa830afc4de4077.tar.gz
tor-bb8689b86480d81aa150d5f27fa830afc4de4077.zip
Merge remote-tracking branch 'origin/maint-0.2.2'
-rw-r--r--changes/bug30207
-rw-r--r--src/or/circuitbuild.c3
-rw-r--r--src/or/hibernate.c3
3 files changed, 10 insertions, 3 deletions
diff --git a/changes/bug3020 b/changes/bug3020
new file mode 100644
index 0000000000..b987161229
--- /dev/null
+++ b/changes/bug3020
@@ -0,0 +1,7 @@
+ o Minor bugfixes:
+ - When checking whether a hibernation period has fully elapsed, use
+ the amount of seconds we expect for that period instead of using
+ the new period that just started. This would cause an issue because
+ February is a really short month. Bugfix on 0.2.2.17-alpha;
+ fixes bug 3020.
+
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index cc78d9993a..c52e4715cf 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -4601,8 +4601,7 @@ find_bridge_by_digest(const char *digest)
return NULL;
}
-/** We need to ask <b>bridge</b> for its server descriptor. <b>address</b>
- * is a helpful string describing this bridge. */
+/** We need to ask <b>bridge</b> for its server descriptor. */
static void
launch_direct_bridge_descriptor_fetch(bridge_info_t *bridge)
{
diff --git a/src/or/hibernate.c b/src/or/hibernate.c
index 1878d5d52d..aebce4cc88 100644
--- a/src/or/hibernate.c
+++ b/src/or/hibernate.c
@@ -378,7 +378,8 @@ configure_accounting(time_t now)
/* We are in the interval we thought we were in. Do nothing.*/
interval_end_time = start_of_accounting_period_after(interval_start_time);
} else {
- long duration = length_of_accounting_period_containing(now);
+ long duration =
+ length_of_accounting_period_containing(interval_start_time);
double delta = ((double)(s_now - interval_start_time)) / duration;
if (-0.50 <= delta && delta <= 0.50) {
/* The start of the period is now a little later or earlier than we