]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Improve log when unable to add sigs to pending consensus
authorNick Mathewson <nickm@torproject.org>
Fri, 26 Jan 2018 19:19:59 +0000 (14:19 -0500)
committerNick Mathewson <nickm@torproject.org>
Fri, 26 Jan 2018 19:19:59 +0000 (14:19 -0500)
Closes ticket 24849.

changes/ticket24849 [new file with mode: 0644]
src/or/dirvote.c

diff --git a/changes/ticket24849 b/changes/ticket24849
new file mode 100644 (file)
index 0000000..fd9492a
--- /dev/null
@@ -0,0 +1,3 @@
+  o Minor features (directory authority):
+    - When unable to add signatures to a pending consensus, log the reason
+      why. Closes ticket 24849.
index ce82a5ef4a32bc883e2a92424bbd3ff23ab5aa9b..e57f6d46f8ca4d964ea341334d06b859c1547f5e 100644 (file)
@@ -3551,7 +3551,13 @@ dirvote_add_signatures_to_pending_consensus(
   }
   r = networkstatus_add_detached_signatures(pc->consensus, sigs,
                                             source, severity, msg_out);
-  log_info(LD_DIR,"Added %d signatures to consensus.", r);
+  if (r >= 0) {
+    log_info(LD_DIR,"Added %d signatures to consensus.", r);
+  } else {
+    log_fn(LOG_PROTOCOL_WARN, LD_DIR,
+           "Unable to add signatures to consensus: %s",
+           *msg_out ? *msg_out : "(unknown)");
+  }
 
   if (r >= 1) {
     char *new_signatures =