mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 05:33:47 +01:00
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).
This commit is contained in:
parent
d92b999757
commit
18cd1993ca
@ -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 "
|
||||
|
Loading…
Reference in New Issue
Block a user