diff options
author | Nick Mathewson <nickm@torproject.org> | 2007-08-13 21:01:02 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2007-08-13 21:01:02 +0000 |
commit | 9356a0b1dd21d5cedb58ed17e054ac9060221002 (patch) | |
tree | 354eb1ffaefbfd698683b5d3bbca09f979239ac0 /src/or/directory.c | |
parent | 7d990b5aa104fff4c23eba2366bb215ac446e7b2 (diff) | |
download | tor-9356a0b1dd21d5cedb58ed17e054ac9060221002.tar.gz tor-9356a0b1dd21d5cedb58ed17e054ac9060221002.zip |
r14544@catbus: nickm | 2007-08-13 17:00:09 -0400
Give a 200 when a duplicate vote gets uploaded.
svn:r11094
Diffstat (limited to 'src/or/directory.c')
-rw-r--r-- | src/or/directory.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/or/directory.c b/src/or/directory.c index d5ac919e32..0a4eb1f34e 100644 --- a/src/or/directory.c +++ b/src/or/directory.c @@ -2161,11 +2161,12 @@ directory_handle_command_post(dir_connection_t *conn, const char *headers, if (authdir_mode_v3(options) && !strcmp(url,"/tor/post/vote")) { /* server descriptor post */ const char *msg = "OK"; - if (dirvote_add_vote(body, &msg)) { - write_http_status_line(conn, 200, "Vote stored"); + int status; + if (dirvote_add_vote(body, &msg, &status)) { + write_http_status_line(conn, status, "Vote stored"); } else { tor_assert(msg); - write_http_status_line(conn, 400, msg); + write_http_status_line(conn, status, msg); } goto done; } |