Commit 18cd1993 authored by huyvq's avatar huyvq Committed by Nick Mathewson

Convert authdir_mode_handles_descs() to alternative wrappers

-authdir_mode_handles_descs(options, ROUTER_PURPOSE_BRIDGE) to authdir_mode_bridge(options).

- authdir_mode_handles_descs(options, ROUTER_PURPOSE_GENERAL) to authdir_mode_v3(options).
parent d92b9997
......@@ -1065,7 +1065,7 @@ init_keys(void)
/* 4. Build our router descriptor. */
/* Must be called after keys are initialized. */
mydesc = router_get_my_descriptor();
if (authdir_mode_handles_descs(options, ROUTER_PURPOSE_GENERAL)) {
if (authdir_mode_v3(options)) {
const char *m = NULL;
routerinfo_t *ri;
/* We need to add our own fingerprint so it gets recognized. */
......@@ -1615,7 +1615,7 @@ authdir_mode_handles_descs(const or_options_t *options, int purpose)
else if (purpose == ROUTER_PURPOSE_GENERAL)
return authdir_mode_v3(options);
else if (purpose == ROUTER_PURPOSE_BRIDGE)
return (options->BridgeAuthoritativeDir);
return authdir_mode_bridge(options);
else
return 0;
}
......
......@@ -5164,7 +5164,7 @@ update_consensus_router_descriptor_downloads(time_t now, int is_vote,
smartlist_add(downloadable, rs->descriptor_digest);
} SMARTLIST_FOREACH_END(rsp);
if (!authdir_mode_handles_descs(options, ROUTER_PURPOSE_GENERAL)
if (!authdir_mode_v3(options)
&& smartlist_len(no_longer_old)) {
routerlist_t *rl = router_get_routerlist();
log_info(LD_DIR, "%d router descriptors listed in consensus are "
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment