mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-30 15:43:32 +01:00
Make insert_old try hard to never add a duplicate.
svn:r5661
This commit is contained in:
parent
ece9865020
commit
fa0d5aa894
@ -1226,7 +1226,9 @@ routerlist_insert(routerlist_t *rl, routerinfo_t *ri)
|
|||||||
static void
|
static void
|
||||||
routerlist_insert_old(routerlist_t *rl, routerinfo_t *ri)
|
routerlist_insert_old(routerlist_t *rl, routerinfo_t *ri)
|
||||||
{
|
{
|
||||||
if (get_options()->DirPort) {
|
if (get_options()->DirPort &&
|
||||||
|
!digestmap_get(rl->desc_digest_map,
|
||||||
|
ri->cache_info.signed_descriptor_digest)) {
|
||||||
signed_descriptor_t *sd = signed_descriptor_from_routerinfo(ri);
|
signed_descriptor_t *sd = signed_descriptor_from_routerinfo(ri);
|
||||||
digestmap_set(rl->desc_digest_map, sd->signed_descriptor_digest, sd);
|
digestmap_set(rl->desc_digest_map, sd->signed_descriptor_digest, sd);
|
||||||
smartlist_add(rl->old_routers, sd);
|
smartlist_add(rl->old_routers, sd);
|
||||||
|
Loading…
Reference in New Issue
Block a user