diff options
author | Roger Dingledine <arma@torproject.org> | 2008-01-25 07:11:32 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2008-01-25 07:11:32 +0000 |
commit | 5fcc79185f6dc100ecdd1341953c1f2fbe6692ec (patch) | |
tree | 8a327936d61ccdc4af6f750adbffca7fda6df24c /src/or | |
parent | d72ccd95a8f5b775a4b225bdbc9a861c14721128 (diff) | |
download | tor-5fcc79185f6dc100ecdd1341953c1f2fbe6692ec.tar.gz tor-5fcc79185f6dc100ecdd1341953c1f2fbe6692ec.zip |
avoid calling smartlist_get(..., -1) if we have a consensus but no
hsdir nodes.
svn:r13270
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/routerlist.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c index 6b889dce9d..76365b5dfd 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -4505,7 +4505,8 @@ hid_serv_responsible_for_desc_id(const char *query) return 0; /* This is redundant, but let's be paranoid. */ my_id = me->cache_info.identity_digest; responsible = smartlist_create(); - if (hid_serv_get_responsible_directories(responsible, query)<0) { + (int) hid_serv_get_responsible_directories(responsible, query); + if (!smartlist_len(responsible)) { smartlist_free(responsible); return 0; } |