[or-cvs] r9456: Fix/update some XXX012 points. (in tor/trunk: . src/or)

nickm at seul.org nickm at seul.org
Mon Jan 29 18:13:37 UTC 2007


Author: nickm
Date: 2007-01-29 13:13:37 -0500 (Mon, 29 Jan 2007)
New Revision: 9456

Modified:
   tor/trunk/
   tor/trunk/src/or/directory.c
   tor/trunk/src/or/dns.c
Log:
 r11584 at catbus:  nickm | 2007-01-29 11:25:40 -0500
 Fix/update some XXX012 points.



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

Modified: tor/trunk/src/or/directory.c
===================================================================
--- tor/trunk/src/or/directory.c	2007-01-29 18:13:34 UTC (rev 9455)
+++ tor/trunk/src/or/directory.c	2007-01-29 18:13:37 UTC (rev 9456)
@@ -279,8 +279,14 @@
 void
 connection_dir_request_failed(dir_connection_t *conn)
 {
-  if (router_digest_is_me(conn->identity_digest))
+  if (directory_conn_is_self_reachability_test(conn)) {
+    routerinfo_t *me = router_get_my_routerinfo();
+    if (me)
+      control_event_server_status(LOG_WARN,
+                                  "REACHABILITY_FAILED DIRADDRESS=%s:%d",
+                                  me->address, me->dir_port);
     return; /* this was a test fetch. don't retry. */
+  }
   router_set_status(conn->identity_digest, 0); /* don't try him again */
   if (conn->_base.purpose == DIR_PURPOSE_FETCH_DIR ||
       conn->_base.purpose == DIR_PURPOSE_FETCH_RUNNING_LIST) {
@@ -288,16 +294,6 @@
              conn->_base.address, conn->_base.port);
     directory_get_from_dirserver(conn->_base.purpose, NULL,
                                  0 /* don't retry_if_no_servers */);
-
-    if (directory_conn_is_self_reachability_test(conn)) {
-      /* XXX012 look at the 'if' at the top of this function. this
-       * code will never be reached. -RD */
-      routerinfo_t *me = router_get_my_routerinfo();
-      if (me)
-        control_event_server_status(LOG_WARN,
-                                    "REACHABILITY_FAILED DIRADDRESS=%s:%d",
-                                    me->address, me->dir_port);
-    }
   } else if (conn->_base.purpose == DIR_PURPOSE_FETCH_NETWORKSTATUS) {
     log_info(LD_DIR, "Giving up on directory server at '%s'; retrying",
              conn->_base.address);
@@ -2048,7 +2044,9 @@
                 cp, (int)rs->n_download_failures);
   });
 
-  /* XXX012 why did this get commented out too? */
+  /* XXX012 why did this get commented out too? -RD */
+  /*        Because we already call update_router_descriptor_downloads()
+   *        every 10 seconds (DESCRIPTOR_RETRY_INTERVAL) in main.c -NM */
   /* update_router_descriptor_downloads(time(NULL)); */
 }
 

Modified: tor/trunk/src/or/dns.c
===================================================================
--- tor/trunk/src/or/dns.c	2007-01-29 18:13:34 UTC (rev 9455)
+++ tor/trunk/src/or/dns.c	2007-01-29 18:13:37 UTC (rev 9456)
@@ -1713,7 +1713,8 @@
      * resolve this? -RD */
     /* XXX012 Are you sure I didn't fix that in version r9336 with
      * ServerDNSAllowNonRFC953Addreesses? If it's still not working,
-     * let me know which addresses are breaking. -NM */
+     * let me know which addresses are breaking. If it _is_ working,
+     * please remove these comments. :) -NM */
     if (exitconn->_base.purpose == EXIT_PURPOSE_RESOLVE) {
       if (evdns_err_is_transient(r))
         send_resolved_cell(exitconn, circ, RESOLVED_TYPE_ERROR_TRANSIENT);



More information about the tor-commits mailing list