aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSebastian Hahn <sebastian@torproject.org>2011-11-08 12:44:12 +0100
committerSebastian Hahn <sebastian@torproject.org>2011-11-08 12:44:12 +0100
commit4ccc8d029266dc673d901c01a7a8f59b4f530542 (patch)
tree194b8121691e893d1b5d8c99267d909360b08f1f /src
parente26f5553ecf7563aeee7c203b36248f445f5d812 (diff)
downloadtor-4ccc8d029266dc673d901c01a7a8f59b4f530542.tar
tor-4ccc8d029266dc673d901c01a7a8f59b4f530542.tar.gz
Don't exit on dirauths for some config transitions
Diffstat (limited to 'src')
-rw-r--r--src/or/router.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/or/router.c b/src/or/router.c
index c9f141b7f..6199e9e3c 100644
--- a/src/or/router.c
+++ b/src/or/router.c
@@ -646,15 +646,26 @@ init_keys(void)
return -1;
}
if (mydesc) {
+ was_router_added_t added;
ri = router_parse_entry_from_string(mydesc, NULL, 1, 0, NULL);
if (!ri) {
log_err(LD_GENERAL,"Generated a routerinfo we couldn't parse.");
return -1;
}
- if (!WRA_WAS_ADDED(dirserv_add_descriptor(ri, &m, "self"))) {
- log_err(LD_GENERAL,"Unable to add own descriptor to directory: %s",
- m?m:"<unknown error>");
- return -1;
+ added = dirserv_add_descriptor(ri, &m, "self");
+ if (!WRA_WAS_ADDED(added)) {
+ if (WRA_WAS_REJECTED(added)) {
+ log_err(LD_GENERAL, "Unable to add own descriptor to directory: %s",
+ m?m:"<unknown error>");
+ return -1;
+ } else {
+ /* If the descriptor wasn't rejected, that's ok. This can happen
+ * when some config options are toggled that affect workers, but
+ * we don't really need new keys yet so the descriptor doesn't
+ * change and the old one is still fresh. */
+ log_info(LD_GENERAL, "Couldn't add own descriptor to directory: %s",
+ m?m:"unknown error>");
+ }
}
}
}