diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-07-17 20:00:19 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-07-19 17:51:15 -0400 |
commit | 6208106c18c696756fe2be8f941992e31aa66a8d (patch) | |
tree | d3e964d00954bc8349fea9b0dbb4f6f21e810b0e /src/or/routerlist.c | |
parent | dee4f068ee8be3d424aaa300168564f4abd18a36 (diff) | |
download | tor-6208106c18c696756fe2be8f941992e31aa66a8d.tar.gz tor-6208106c18c696756fe2be8f941992e31aa66a8d.zip |
Try to re-approximate the older semantics of nodelist_add_routerinfo
Diffstat (limited to 'src/or/routerlist.c')
-rw-r--r-- | src/or/routerlist.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c index a349a4d0d8..c96a7268b8 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -2877,7 +2877,7 @@ routerlist_insert(routerlist_t *rl, routerinfo_t *ri) &ri->cache_info); smartlist_add(rl->routers, ri); ri->cache_info.routerlist_index = smartlist_len(rl->routers) - 1; - nodelist_add_routerinfo(NULL, ri); + nodelist_set_routerinfo(ri, NULL); router_dir_info_changed(); #ifdef DEBUG_ROUTERLIST routerlist_assert_ok(rl); @@ -3106,7 +3106,11 @@ routerlist_replace(routerlist_t *rl, routerinfo_t *ri_old, tor_assert(0 <= idx && idx < smartlist_len(rl->routers)); tor_assert(smartlist_get(rl->routers, idx) == ri_old); - nodelist_replace_routerinfo(ri_old, ri_new); + { + routerinfo_t *ri_old_tmp=NULL; + nodelist_set_routerinfo(ri_new, &ri_old_tmp); + tor_assert(ri_old == ri_old_tmp); + } router_dir_info_changed(); if (idx >= 0) { |