[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] Convert authdir_mode_handles_descs() to alternative wrappers
commit 18cd1993ca852b25a18b266ae7d8dcecf573525a
Author: huyvq <huyvq.c633@xxxxxxxxx>
Date: Fri Jun 2 23:32:41 2017 +0700
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).
---
src/or/router.c | 4 ++--
src/or/routerlist.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/or/router.c b/src/or/router.c
index a264af1..e12f138 100644
--- a/src/or/router.c
+++ b/src/or/router.c
@@ -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;
}
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index 0e45f63..da072be 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -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 "
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits