diff options
author | Roger Dingledine <arma@torproject.org> | 2007-10-16 02:06:30 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2007-10-16 02:06:30 +0000 |
commit | e477a3860a686205e6374ce8759fe15f3c86dc18 (patch) | |
tree | ac506c917fc07f6499f88d170ebbffb37f623f13 /src/or | |
parent | 9b3957e7553d053643fb0f73848493c906c78230 (diff) | |
download | tor-e477a3860a686205e6374ce8759fe15f3c86dc18.tar tor-e477a3860a686205e6374ce8759fe15f3c86dc18.tar.gz |
two ugly hacks to make my tor client start again. nick, these
are for you.
svn:r11960
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/networkstatus.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/or/networkstatus.c b/src/or/networkstatus.c index 672b1fbc5..32f61fc86 100644 --- a/src/or/networkstatus.c +++ b/src/or/networkstatus.c @@ -864,7 +864,8 @@ networkstatus_copy_old_consensus_info(networkstatus_vote_t *new_c, 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 @@ networkstatus_copy_old_consensus_info(networkstatus_vote_t *new_c, } 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; |