[or-cvs] r11960: two ugly hacks to make my tor client start again. nick, thes (tor/trunk/src/or)

arma at seul.org arma at seul.org
Tue Oct 16 02:06:30 UTC 2007


Author: arma
Date: 2007-10-15 22:06:30 -0400 (Mon, 15 Oct 2007)
New Revision: 11960

Modified:
   tor/trunk/src/or/networkstatus.c
Log:
two ugly hacks to make my tor client start again. nick, these
are for you.


Modified: tor/trunk/src/or/networkstatus.c
===================================================================
--- tor/trunk/src/or/networkstatus.c	2007-10-16 02:01:56 UTC (rev 11959)
+++ tor/trunk/src/or/networkstatus.c	2007-10-16 02:06:30 UTC (rev 11960)
@@ -864,7 +864,8 @@
   SMARTLIST_FOREACH(new_c->routerstatus_list, routerstatus_t *, rs_new,
   {
     int r;
-    while ((r = memcmp(rs_old->identity_digest, rs_new->identity_digest,
+    while (rs_old && /* XXX020 Nick, solve this: sometimes rs_old is NULL */
+           (r = memcmp(rs_old->identity_digest, rs_new->identity_digest,
                        DIGEST_LEN))<0) {
       if (idx == smartlist_len(old_c->routerstatus_list))
         goto done;
@@ -872,6 +873,9 @@
     }
     if (r>0)
       continue;
+    if (r<0) /* XXX020 Nick, solve this: sometimes it's -1 which doesn't
+              * match your comment below. */
+      continue;
     /* Okay, so we're looking at the same identity. */
     rs_new->name_lookup_warned = rs_old->name_lookup_warned;
     rs_new->last_dir_503_at = rs_old->last_dir_503_at;



More information about the tor-commits mailing list