summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-06-13 19:06:26 +0000
committerNick Mathewson <nickm@torproject.org>2007-06-13 19:06:26 +0000
commit3fa9a90243de3cd87e78917f97a0442d76434be0 (patch)
tree6514f4c69d77d366f522986055c48cf72e78d635 /src
parentc3626cdba7a438986f593b7b76be2399a24100ac (diff)
downloadtor-3fa9a90243de3cd87e78917f97a0442d76434be0.tar.gz
tor-3fa9a90243de3cd87e78917f97a0442d76434be0.zip
r13396@catbus: nickm | 2007-06-13 15:06:18 -0400
Set vote_digest field prproperly in networkstatus_vote_t, so that it gets conveyed to the consensus correctly. svn:r10590
Diffstat (limited to 'src')
-rw-r--r--src/or/routerparse.c2
-rw-r--r--src/or/test.c1
2 files changed, 3 insertions, 0 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c
index e1b52e7198..7604cb6f63 100644
--- a/src/or/routerparse.c
+++ b/src/or/routerparse.c
@@ -1883,6 +1883,8 @@ networkstatus_parse_vote_from_string(const char *s, int is_vote)
if (voter)
smartlist_add(ns->voters, voter);
voter = tor_malloc_zero(sizeof(networkstatus_voter_info_t));
+ if (is_vote)
+ memcpy(voter->vote_digest, ns_digest, DIGEST_LEN);
voter->nickname = tor_strdup(tok->args[0]);
if (strlen(tok->args[1]) != HEX_DIGEST_LEN ||
diff --git a/src/or/test.c b/src/or/test.c
index 4b637da983..8d64ee000e 100644
--- a/src/or/test.c
+++ b/src/or/test.c
@@ -2389,6 +2389,7 @@ test_v3_networkstatus(void)
test_assert(consensus_text);
consensus = networkstatus_parse_vote_from_string(consensus_text, 0);
test_assert(consensus);
+ // log_notice(LD_GENERAL, "<<%s>>", consensus_text);
/* XXXX020 check consensus contents. */