[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r11090: Stop segfaulting on failed consensus. (in tor/trunk: . src/or)



Author: nickm
Date: 2007-08-13 16:17:14 -0400 (Mon, 13 Aug 2007)
New Revision: 11090

Modified:
   tor/trunk/
   tor/trunk/src/or/dirvote.c
Log:
 r13987@Kushana:  nickm | 2007-08-13 16:17:09 -0400
 Stop segfaulting on failed consensus.



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r13987] on c95137ef-5f19-0410-b913-86e773d04f59

Modified: tor/trunk/src/or/dirvote.c
===================================================================
--- tor/trunk/src/or/dirvote.c	2007-08-13 20:05:25 UTC (rev 11089)
+++ tor/trunk/src/or/dirvote.c	2007-08-13 20:17:14 UTC (rev 11090)
@@ -1276,7 +1276,10 @@
         votes, n_voters,
         my_cert->identity_key,
         get_my_v3_authority_signing_key());
-
+  if (!consensus_body) {
+    log_warn(LD_DIR, "Couldn't generate a consensus at all!");
+    goto err;
+  }
   consensus = networkstatus_parse_vote_from_string(consensus_body, 0);
   if (!consensus) {
     log_warn(LD_DIR, "Couldn't parse consensus we generated!");