[or-cvs] r10590: Set vote_digest field prproperly in networkstatus_vote_t, so (in tor/trunk: . src/or)
nickm at seul.org
nickm at seul.org
Wed Jun 13 19:06:26 UTC 2007
Author: nickm
Date: 2007-06-13 15:06:26 -0400 (Wed, 13 Jun 2007)
New Revision: 10590
Modified:
tor/trunk/
tor/trunk/src/or/routerparse.c
tor/trunk/src/or/test.c
Log:
r13396 at 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.
Property changes on: tor/trunk
___________________________________________________________________
svk:merge ticket from /tor/trunk [r13396] on 8246c3cf-6607-4228-993b-4d95d33730f1
Modified: tor/trunk/src/or/routerparse.c
===================================================================
--- tor/trunk/src/or/routerparse.c 2007-06-13 19:06:23 UTC (rev 10589)
+++ tor/trunk/src/or/routerparse.c 2007-06-13 19:06:26 UTC (rev 10590)
@@ -1883,6 +1883,8 @@
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 ||
Modified: tor/trunk/src/or/test.c
===================================================================
--- tor/trunk/src/or/test.c 2007-06-13 19:06:23 UTC (rev 10589)
+++ tor/trunk/src/or/test.c 2007-06-13 19:06:26 UTC (rev 10590)
@@ -2389,6 +2389,7 @@
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. */
More information about the tor-commits
mailing list