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

[or-cvs] Patch for task 133



Update of /home/or/cvsroot/tor/src/or
In directory moria.mit.edu:/tmp/cvs-serv6615

Modified Files:
	routerlist.c 
Log Message:
Patch for task 133

Index: routerlist.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/routerlist.c,v
retrieving revision 1.229
retrieving revision 1.230
diff -u -d -r1.229 -r1.230
--- routerlist.c	6 May 2005 08:53:23 -0000	1.229
+++ routerlist.c	10 May 2005 22:33:45 -0000	1.230
@@ -26,6 +26,7 @@
 static trusted_dir_server_t *
 router_pick_trusteddirserver_impl(int requireother, int fascistfirewall);
 static void mark_all_trusteddirservers_up(void);
+static int router_resolve(routerinfo_t *router);
 static int router_resolve_routerlist(routerlist_t *dir);
 
 /****************************************************************************/
@@ -929,6 +930,12 @@
     control_event_descriptors_changed(changed);
     smartlist_free(changed);
   }
+
+  if (router_resolve(ri)<0) {
+    if (msg && !*msg) *msg = "Couldn't resolve router address.";
+    return 0;
+  }
+
   log_fn(LOG_DEBUG, "Added router to list");
   return 1;
 }