diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-04-27 09:30:08 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-04-27 09:30:08 -0400 |
commit | b4fe0a6a0321f241cc0a37ca6fc528aae33afd74 (patch) | |
tree | 493a9df983501aa5be84353779076f847237138a /src/or/routerlist.c | |
parent | 52316f9969a049ec5e2d72c2f0002f0ed32b60cb (diff) | |
download | tor-b4fe0a6a0321f241cc0a37ca6fc528aae33afd74.tar.gz tor-b4fe0a6a0321f241cc0a37ca6fc528aae33afd74.zip |
Improve control flow in authority_certs_fetch_resource_impl
Diffstat (limited to 'src/or/routerlist.c')
-rw-r--r-- | src/or/routerlist.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c index bff2cca048..060862f25c 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -961,17 +961,16 @@ authority_certs_fetch_resource_impl(const char *resource, directory_request_set_or_addr_port(req, &or_ap); if (dir_hint) directory_request_set_directory_id_digest(req, dir_hint); - } - - if (rs) { - /* If we've just downloaded a consensus from a directory, re-use that + } else if (rs) { + /* And if we've just downloaded a consensus from a directory, re-use that * directory */ req = directory_request_new(DIR_PURPOSE_FETCH_CERTIFICATE); directory_request_set_routerstatus(req, rs); } if (req) { - /* Fill in the other request fields, and send the request. */ + /* We've set up a request object -- fill in the other request fields, and + * send the request. */ directory_request_set_indirection(req, indirection); directory_request_set_resource(req, resource); directory_initiate_request(req); |