[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] Improve control flow in authority_certs_fetch_resource_impl
commit b4fe0a6a0321f241cc0a37ca6fc528aae33afd74
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date: Thu Apr 27 09:30:08 2017 -0400
Improve control flow in authority_certs_fetch_resource_impl
---
src/or/routerlist.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index bff2cca..060862f 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);
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits