diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-03-28 10:47:17 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-04-24 11:17:36 -0400 |
commit | db81cdbb0f9a69bc7bb0a4f77ff0fe44875f7cda (patch) | |
tree | 53c7577474e87266b768730446ec1d68182b5560 | |
parent | 54520e49cd2a10778e7c58d797f22a768da6557a (diff) | |
download | tor-db81cdbb0f9a69bc7bb0a4f77ff0fe44875f7cda.tar.gz tor-db81cdbb0f9a69bc7bb0a4f77ff0fe44875f7cda.zip |
Tweak the bug4438 fix a little: different check, better log
Instead of checking for 'rejected' and calling everything else okay,
let's check for 'outdated' and call everythign else a problem. This
way we don't risk missing future errors so much.
When logging a message that _looks_ like an error message at info, we
should mention that it isn't really a problem.
-rw-r--r-- | src/or/router.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/or/router.c b/src/or/router.c index 6199e9e3cc..451d95d03c 100644 --- a/src/or/router.c +++ b/src/or/router.c @@ -654,17 +654,18 @@ init_keys(void) } added = dirserv_add_descriptor(ri, &m, "self"); if (!WRA_WAS_ADDED(added)) { - if (WRA_WAS_REJECTED(added)) { + if (!WRA_WAS_OUTDATED(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 + /* If the descriptor was outdated, 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>"); + log_info(LD_GENERAL, "Couldn't add own descriptor to directory " + "after key init: %s. This is usually not a problem.", + m?m:"<unknown error>"); } } } |