From 5fcc79185f6dc100ecdd1341953c1f2fbe6692ec Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Fri, 25 Jan 2008 07:11:32 +0000 Subject: [PATCH] avoid calling smartlist_get(..., -1) if we have a consensus but no hsdir nodes. svn:r13270 --- src/or/routerlist.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } -- 2.11.4.GIT