summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Shepard <andrea@persephoneslair.org>2012-06-28 00:21:06 -0700
committerNick Mathewson <nickm@torproject.org>2012-06-28 10:42:43 -0400
commitbdc8270280b345f0e02a6615f8670f3c47d99a22 (patch)
treed93f25cb80e616c3f251a27ee3567c9cc39b5e36
parent23f2e37ff75ef539cc5634e3f48f9a86cb95a2d9 (diff)
downloadtor-bdc8270280b345f0e02a6615f8670f3c47d99a22.tar.gz
tor-bdc8270280b345f0e02a6615f8670f3c47d99a22.zip
Downgrade 'Got a certificate, but we already have it' log message from warning to info, except when we're a dirauth (fixes bug 5238)
-rw-r--r--changes/bug52383
-rw-r--r--src/or/routerlist.c15
2 files changed, 15 insertions, 3 deletions
diff --git a/changes/bug5238 b/changes/bug5238
new file mode 100644
index 0000000000..2f18707dd0
--- /dev/null
+++ b/changes/bug5238
@@ -0,0 +1,3 @@
+ o Minor bugfixes:
+ - Downgrade "Got a certificate, but we already have it" log mesages from
+ warning to info, except when we're a dirauth.
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index 490c123367..8349b7ad6c 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -217,9 +217,18 @@ trusted_dirs_load_certs_from_string(const char *contents, int from_store,
* probably means we wanted a different secret key or we are trying to
* replace an expired cert that has not in fact been updated. */
if (!from_store) {
- log_warn(LD_DIR, "Got a certificate for %s, but we already have it. "
- "Maybe they haven't updated it. Waiting for a while.",
- ds ? ds->nickname : "an old or new authority");
+ if (authdir_mode(get_options())) {
+ log_warn(LD_DIR,
+ "Got a certificate for %s, but we already have it. "
+ "Maybe they haven't updated it. Waiting for a while.",
+ ds ? ds->nickname : "an old or new authority");
+ } else {
+ log_info(LD_DIR,
+ "Got a certificate for %s, but we already have it. "
+ "Maybe they haven't updated it. Waiting for a while.",
+ ds ? ds->nickname : "an old or new authority");
+ }
+
authority_cert_dl_failed(cert->cache_info.identity_digest, 404);
}