mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
r15371@catbus: nickm | 2007-09-25 19:53:13 -0400
Always set status_out when adding a vote. svn:r11646
This commit is contained in:
parent
4d44bf1edc
commit
95d97c722a
@ -1418,6 +1418,12 @@ dirvote_add_vote(const char *vote_body, const char **msg_out, int *status_out)
|
||||
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 @@ dirvote_add_vote(const char *vote_body, const char **msg_out, int *status_out)
|
||||
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 "))
|
||||
|
Loading…
Reference in New Issue
Block a user