summaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-05-19 00:32:00 +0000
committerNick Mathewson <nickm@torproject.org>2007-05-19 00:32:00 +0000
commit61a116b3da49bb8c49e4ca05da09ef7550cf0282 (patch)
tree27a6da6c60cca812b572c36b3ffce64478d5fea8 /src/or
parentadf95e7f00b293a076c46e3288211b29b4b3de3e (diff)
downloadtor-61a116b3da49bb8c49e4ca05da09ef7550cf0282.tar.gz
tor-61a116b3da49bb8c49e4ca05da09ef7550cf0282.zip
r12798@catbus: nickm | 2007-05-18 20:31:54 -0400
Yet more debugging code to track down 417/404, inspired by a fun core from arma. svn:r10216
Diffstat (limited to 'src/or')
-rw-r--r--src/or/routerlist.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index 4de27dca76..3476af981d 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -1738,6 +1738,12 @@ routerlist_insert(routerlist_t *rl, routerinfo_t *ri)
{
routerinfo_t *ri_old;
routerlist_check_bug_417();
+ {
+ /* XXXX020 remove this code once bug 417/404 is fixed. */
+ routerinfo_t *ri_generated = router_get_my_routerinfo();
+ tor_assert(ri_generated != ri);
+ }
+
ri_old = digestmap_set(rl->identity_map, ri->cache_info.identity_digest, ri);
tor_assert(!ri_old);
digestmap_set(rl->desc_digest_map, ri->cache_info.signed_descriptor_digest,
@@ -1805,6 +1811,11 @@ static void
routerlist_insert_old(routerlist_t *rl, routerinfo_t *ri)
{
routerlist_check_bug_417();
+ {
+ /* XXXX020 remove this code once bug 417/404 is fixed. */
+ routerinfo_t *ri_generated = router_get_my_routerinfo();
+ tor_assert(ri_generated != ri);
+ }
if (get_options()->DirPort &&
ri->purpose == ROUTER_PURPOSE_GENERAL &&
!digestmap_get(rl->desc_digest_map,
@@ -1921,6 +1932,11 @@ routerlist_replace(routerlist_t *rl, routerinfo_t *ri_old,
routerinfo_t *ri_tmp;
extrainfo_t *ei_tmp;
routerlist_check_bug_417();
+ {
+ /* XXXX020 remove this code once bug 417/404 is fixed. */
+ routerinfo_t *ri_generated = router_get_my_routerinfo();
+ tor_assert(ri_generated != ri_new);
+ }
tor_assert(ri_old != ri_new);
idx = _routerlist_find_elt(rl->routers, ri_old, idx);
router_dir_info_changed();