From 6fb27741ba2c02ca94804ef763647c8966886434 Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Sat, 1 Apr 2006 22:00:49 +0000 Subject: Fix dirserv_get_networkstatus_v2's api: its function comments did not at all match its behavior, and I can't think of a case when it should return anything other than 0. This fix may allow getinfo dir/status/foo to work. svn:r6285 --- src/or/dirserv.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/or/dirserv.c') diff --git a/src/or/dirserv.c b/src/or/dirserv.c index 432b4364e6..23118a749a 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -1454,12 +1454,9 @@ generate_v2_networkstatus(void) /** Look for a network status object as specified by key, which should * be either "authority" (to find a network status generated by us), a hex * identity digest (to find a network status generated by given directory), or - * "all" (to return all the v2 network status objects we have, concatenated). - * If compress, find the version compressed with zlib. Return 0 if - * nothing was found; otherwise set *directory to the matching network - * status and return its length. + * "all" (to return all the v2 network status objects we have). */ -int +void dirserv_get_networkstatus_v2(smartlist_t *result, const char *key) { @@ -1468,7 +1465,7 @@ dirserv_get_networkstatus_v2(smartlist_t *result, if (!cached_v2_networkstatus) cached_v2_networkstatus = digestmap_new(); - if (!(strcmp(key,"authority"))) { + if (!strcmp(key,"authority")) { if (get_options()->AuthoritativeDir) { cached_dir_t *d = dirserv_pick_cached_dir_obj(NULL, @@ -1518,7 +1515,6 @@ dirserv_get_networkstatus_v2(smartlist_t *result, }); smartlist_free(digests); } - return 0; } /** Add a signed_descriptor_t to descs_out for each router matching -- cgit v1.2.3-54-g00ecf