summaryrefslogtreecommitdiff
path: root/src/or/networkstatus.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2009-09-14 22:15:57 -0400
committerNick Mathewson <nickm@torproject.org>2009-09-14 23:21:53 -0400
commit381766ce4b11454607f025aafb6767aa9789d271 (patch)
tree8aa7a0976703db20a5fc12d128414068020d47af /src/or/networkstatus.c
parent0edc39303d32537ed95c171de6a7ad0f068b60df (diff)
downloadtor-381766ce4b11454607f025aafb6767aa9789d271.tar.gz
tor-381766ce4b11454607f025aafb6767aa9789d271.zip
Implement proposal 167: Authorities vote on network parameters.
This code adds a new field to vote on: "params". It consists of a list of sorted key=int pairs. The output is computed as the median of all the integers for any key on which anybody voted. Improved with input from Roger.
Diffstat (limited to 'src/or/networkstatus.c')
-rw-r--r--src/or/networkstatus.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/or/networkstatus.c b/src/or/networkstatus.c
index b022999607..70d43e6503 100644
--- a/src/or/networkstatus.c
+++ b/src/or/networkstatus.c
@@ -286,6 +286,10 @@ networkstatus_vote_free(networkstatus_t *ns)
SMARTLIST_FOREACH(ns->known_flags, char *, c, tor_free(c));
smartlist_free(ns->known_flags);
}
+ if (ns->net_params) {
+ SMARTLIST_FOREACH(ns->net_params, char *, c, tor_free(c));
+ smartlist_free(ns->net_params);
+ }
if (ns->supported_methods) {
SMARTLIST_FOREACH(ns->supported_methods, char *, c, tor_free(c));
smartlist_free(ns->supported_methods);