[or-cvs] when we succeed at connecting to a helper that we"ve never ...

arma at seul.org arma at seul.org
Tue Dec 27 08:54:39 UTC 2005


Update of /home2/or/cvsroot/tor/src/or
In directory moria:/home/arma/work/onion/cvs/tor/src/or

Modified Files:
	circuitbuild.c 
Log Message:
when we succeed at connecting to a helper that we've never connected
to before, mark all the previous helpers as up. This is handy if the
network went away and then returned.


Index: circuitbuild.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/circuitbuild.c,v
retrieving revision 1.192
retrieving revision 1.193
diff -u -p -d -r1.192 -r1.193
--- circuitbuild.c	27 Dec 2005 08:38:22 -0000	1.192
+++ circuitbuild.c	27 Dec 2005 08:54:37 -0000	1.193
@@ -1951,6 +1951,17 @@ helper_node_set_status(const char *diges
         if (succeeded) {
           if (!helper->made_contact) {
             helper->made_contact = 1;
+            /* We've just added a new long-term helper node.
+             * Perhaps the network just came back? We should
+             * give our earlier helpers another try too. */
+            SMARTLIST_FOREACH(helper_nodes, helper_node_t *, h,
+              {
+                routerinfo_t *r = router_get_by_digest(h->identity);
+                h->down_since = 0;
+                if (r) r->is_running = 1;
+                if (h == helper)
+                  break;
+              });
             changed = 1;
           }
           if (helper->down_since) {



More information about the tor-commits mailing list