diff options
author | David Goulet <dgoulet@torproject.org> | 2016-05-03 11:21:17 -0400 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2016-07-01 13:25:03 -0400 |
commit | ca6ceec112f05ce68097429089ee428010c8b8d0 (patch) | |
tree | a297cc544c7f354a458a1712d7e2d101fcb6aa0b /src/or/networkstatus.c | |
parent | 5b183328fdd4bf81a3a38afe88d2766e61773fb9 (diff) | |
download | tor-ca6ceec112f05ce68097429089ee428010c8b8d0.tar.gz tor-ca6ceec112f05ce68097429089ee428010c8b8d0.zip |
prop250: Put commits and SRVs in votes/consensus
This commit adds the commit(s) line in the vote as well as the SR values. It
also has the mechanism to add the majority SRVs in the consensus.
Signed-off-by: George Kadianakis <desnacked@riseup.net>
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or/networkstatus.c')
-rw-r--r-- | src/or/networkstatus.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/or/networkstatus.c b/src/or/networkstatus.c index da51698da4..aabbffff1d 100644 --- a/src/or/networkstatus.c +++ b/src/or/networkstatus.c @@ -32,7 +32,9 @@ #include "router.h" #include "routerlist.h" #include "routerparse.h" +#include "shared_random.h" #include "transports.h" +#include "torcert.h" /** Map from lowercase nickname to identity digest of named server, if any. */ static strmap_t *named_server_map = NULL; @@ -320,6 +322,14 @@ networkstatus_vote_free(networkstatus_t *ns) digestmap_free(ns->desc_digest_map, NULL); + if (ns->sr_info.commits) { + SMARTLIST_FOREACH(ns->sr_info.commits, sr_commit_t *, c, + sr_commit_free(c)); + smartlist_free(ns->sr_info.commits); + } + tor_free(ns->sr_info.previous_srv); + tor_free(ns->sr_info.current_srv); + memwipe(ns, 11, sizeof(*ns)); tor_free(ns); } |