summaryrefslogtreecommitdiff
path: root/src/or/router.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-09-10 16:33:19 -0400
committerNick Mathewson <nickm@torproject.org>2012-12-06 11:28:48 -0500
commit46a62e3256e078866c68e119d1da2afdb10a8306 (patch)
tree218fbc743a3b0ced3efe7dbf43609a7b37c1f6ac /src/or/router.c
parent705ee3b5d4c3a11ffbb68a305a7bf0d081198500 (diff)
downloadtor-46a62e3256e078866c68e119d1da2afdb10a8306.tar.gz
tor-46a62e3256e078866c68e119d1da2afdb10a8306.zip
Refactor add_trusted_dir_server
Now creating a dir_server_t and adding it are separate functions, and there are frontend functions for adding a trusted dirserver and a fallback dirserver.
Diffstat (limited to 'src/or/router.c')
-rw-r--r--src/or/router.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/router.c b/src/or/router.c
index 7d069f9fa2..34eb66af10 100644
--- a/src/or/router.c
+++ b/src/or/router.c
@@ -732,7 +732,7 @@ init_keys(void)
ds = router_get_trusteddirserver_by_digest(digest);
if (!ds) {
- ds = add_trusted_dir_server(options->Nickname, NULL,
+ ds = trusted_dir_server_new(options->Nickname, NULL,
router_get_advertised_dir_port(options, 0),
router_get_advertised_or_port(options),
digest,
@@ -743,6 +743,7 @@ init_keys(void)
"couldn't add ourselves to the authority list. Failing.");
return -1;
}
+ dir_server_add(ds);
}
if (ds->type != type) {
log_warn(LD_DIR, "Configured authority type does not match authority "