[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r11829: Turns out, Bug 463 was just another "warn about something th (in tor/trunk: . src/or)



Author: nickm
Date: 2007-10-10 00:37:38 -0400 (Wed, 10 Oct 2007)
New Revision: 11829

Modified:
   tor/trunk/
   tor/trunk/ChangeLog
   tor/trunk/src/or/dns.c
Log:
 r15621@catbus:  nickm | 2007-10-10 00:37:25 -0400
 Turns out, Bug 463 was just another "warn about something that is no big deal" thing. Downgrade, comment, and resolve.



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r15621] on 8246c3cf-6607-4228-993b-4d95d33730f1

Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog	2007-10-10 04:24:02 UTC (rev 11828)
+++ tor/trunk/ChangeLog	2007-10-10 04:37:38 UTC (rev 11829)
@@ -55,6 +55,11 @@
     - On some platforms, accept() can return a broken address.  Detect
       this more quietly, and deal accordingly.  (Fixes bug 483.)
 
+  o Minor bugfixes (DNS):
+    - It's not actually an error to find a non-pending entry in the DNS
+      cache when canceling a pending resolve.  Don't log unless stuff
+      is fishy.  Resolves bug 463.
+
   o Code simplifications and refactoring:
     - Make a bunch of functions static.  Remove some dead code.
     - Pull out about a third of the really big routerlist.c; put it in a

Modified: tor/trunk/src/or/dns.c
===================================================================
--- tor/trunk/src/or/dns.c	2007-10-10 04:24:02 UTC (rev 11828)
+++ tor/trunk/src/or/dns.c	2007-10-10 04:37:38 UTC (rev 11829)
@@ -836,8 +836,15 @@
     return;
 
   if (resolve->state != CACHE_STATE_PENDING) {
-    log_notice(LD_BUG,"Address %s is not pending (state %d). Dropping.",
-               escaped_safe_str(address), resolve->state);
+    /* We can get into this state if we never actually created the pending
+     * resolve, due to finding an earlier cached error or something.  Just
+     * ignore it. */
+    if (resolve->pending_connections) {
+      log_warn(LD_BUG,
+               "Address %s is not pending but has pending connections!",
+               escaped_safe_str(address));
+      tor_fragile_assert();
+    }
     return;
   }