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

[or-cvs] r11646: Always set status_out when adding a vote. (in tor/trunk: . src/or)



Author: nickm
Date: 2007-09-25 19:57:12 -0400 (Tue, 25 Sep 2007)
New Revision: 11646

Modified:
   tor/trunk/
   tor/trunk/src/or/dirvote.c
Log:
 r15371@catbus:  nickm | 2007-09-25 19:53:13 -0400
 Always set status_out when adding a vote.



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r15371] on 8246c3cf-6607-4228-993b-4d95d33730f1

Modified: tor/trunk/src/or/dirvote.c
===================================================================
--- tor/trunk/src/or/dirvote.c	2007-09-25 23:43:08 UTC (rev 11645)
+++ tor/trunk/src/or/dirvote.c	2007-09-25 23:57:12 UTC (rev 11646)
@@ -1418,6 +1418,12 @@
           v->vote_body = new_cached_dir(tor_strdup(vote_body),
                                         vote->published);
           v->vote = vote;
+          if (end_of_vote &&
+              !strcmpstart(end_of_vote, "network-status-version"))
+            goto again;
+
+          if (!*status_out)
+            *status_out = 200;
           *msg_out = "ok";
           return v;
         } else {
@@ -1450,7 +1456,7 @@
     networkstatus_vote_free(vote);
   if (!*msg_out)
     *msg_out = "Error adding vote";
-  if (!*status_out)
+  if (!*status_out || *status_out == 200)
     *status_out = 400;
 
   if (end_of_vote && !strcmpstart(end_of_vote, "network-status-version "))