From b0e7925c0205a68d730025cc8832110c1675cfd7 Mon Sep 17 00:00:00 2001
From: Robert Ransom <rransom.8774@gmail.com>
Date: Thu, 2 Jun 2011 02:46:04 -0700
Subject: Clear last_hid_serv_requests on SIGNAL NEWNYM

Fixes bug #3309.
---
 changes/bug3309 | 9 +++++++++
 1 file changed, 9 insertions(+)
 create mode 100644 changes/bug3309

(limited to 'changes/bug3309')

diff --git a/changes/bug3309 b/changes/bug3309
new file mode 100644
index 000000000..5df0d9d34
--- /dev/null
+++ b/changes/bug3309
@@ -0,0 +1,9 @@
+  o Minor bugfixes:
+    - Clear the table recording the time of the last request for each
+      hidden service descriptor from each HS directory on SIGNAL
+      NEWNYM.  Previously, we would clear our HS descriptor cache on
+      SIGNAL NEWNYM, but if we had previously retrieved a descriptor
+      (or tried to) from every directory responsible for it, we would
+      refuse to fetch it again for up to 15 minutes.  Bugfix on
+      0.2.2.25-alpha; fixes bug 3309.
+
-- 
cgit v1.2.3


From fc4158dad706a76acbfd3adae8b505495f1004e5 Mon Sep 17 00:00:00 2001
From: Robert Ransom <rransom.8774@gmail.com>
Date: Thu, 2 Jun 2011 03:07:09 -0700
Subject: Add info-level log messages during HS-client-state purge

I hope these will never be useful, but having them and not needing them is
better than needing them and not having them.
---
 changes/bug3309     | 4 ++++
 src/or/rendclient.c | 1 +
 src/or/rendcommon.c | 4 +++-
 3 files changed, 8 insertions(+), 1 deletion(-)

(limited to 'changes/bug3309')

diff --git a/changes/bug3309 b/changes/bug3309
index 5df0d9d34..104056d8e 100644
--- a/changes/bug3309
+++ b/changes/bug3309
@@ -7,3 +7,7 @@
       refuse to fetch it again for up to 15 minutes.  Bugfix on
       0.2.2.25-alpha; fixes bug 3309.
 
+  o Minor features:
+    - Log (at info level) when purging pieces of hidden-service-client
+      state on SIGNAL NEWNYM.
+
diff --git a/src/or/rendclient.c b/src/or/rendclient.c
index 329b2567d..533dfb8a9 100644
--- a/src/or/rendclient.c
+++ b/src/or/rendclient.c
@@ -469,6 +469,7 @@ rend_client_purge_last_hid_serv_requests(void)
   last_hid_serv_requests_ = NULL;
 
   if (old_last_hid_serv_requests != NULL) {
+    log_info(LD_REND, "Purging client last-HS-desc-request-time table");
     strmap_free(old_last_hid_serv_requests, _tor_free);
   }
 }
diff --git a/src/or/rendcommon.c b/src/or/rendcommon.c
index 4d4a90f61..683e11ad2 100644
--- a/src/or/rendcommon.c
+++ b/src/or/rendcommon.c
@@ -839,8 +839,10 @@ rend_cache_clean(void)
 void
 rend_cache_purge(void)
 {
-  if (rend_cache)
+  if (rend_cache) {
+    log_info(LD_REND, "Purging client/v0-HS-authority HS descriptor cache");
     strmap_free(rend_cache, _rend_cache_entry_free);
+  }
   rend_cache = strmap_new();
 }
 
-- 
cgit v1.2.3