[or-cvs] don"t warn when we get a server descriptor from the control...

arma at seul.org arma at seul.org
Wed Feb 15 03:01:55 UTC 2006


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

Modified Files:
	routerlist.c 
Log Message:
don't warn when we get a server descriptor from the controller
but it's too old. that's not something tor should fix.


Index: routerlist.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/routerlist.c,v
retrieving revision 1.446
retrieving revision 1.447
diff -u -p -d -r1.446 -r1.447
--- routerlist.c	13 Feb 2006 21:17:20 -0000	1.446
+++ routerlist.c	15 Feb 2006 03:01:53 -0000	1.447
@@ -1820,6 +1820,7 @@ int
 router_load_single_router(const char *s, const char **msg)
 {
   routerinfo_t *ri;
+  int r;
   smartlist_t *lst;
   tor_assert(msg);
   *msg = NULL;
@@ -1840,10 +1841,11 @@ router_load_single_router(const char *s,
   smartlist_add(lst, ri);
   routers_update_status_from_networkstatus(lst, 0);
 
-  if (router_add_to_routerlist(ri, msg, 0, 0)<0) {
-    log_warn(LD_DIR, "Couldn't add router to list: %s Dropping.",
-             *msg?*msg:"(No message).");
+  if ((r=router_add_to_routerlist(ri, msg, 0, 0))<0) {
     /* we've already assigned to *msg now, and ri is already freed */
+    tor_assert(*msg);
+    if (r < -1)
+      log_warn(LD_DIR, "Couldn't add router to list: %s Dropping.", *msg);
     smartlist_free(lst);
     return 0;
   } else {



More information about the tor-commits mailing list