summaryrefslogtreecommitdiff
path: root/src/or/routerparse.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2015-01-29 14:14:59 -0500
committerNick Mathewson <nickm@torproject.org>2015-01-29 14:14:59 -0500
commitb4a8fd895802801198229574c55b3df975aa2244 (patch)
tree55a7023884a4aaab2dc0df13b370a725102214a0 /src/or/routerparse.c
parentbd630a899a1ff7658a0c52327fa3cce59e7213b4 (diff)
downloadtor-b4a8fd895802801198229574c55b3df975aa2244.tar.gz
tor-b4a8fd895802801198229574c55b3df975aa2244.zip
When there are no package lines, make consensus/packages say "".
Also, give a better error message when there is no consensus.
Diffstat (limited to 'src/or/routerparse.c')
-rw-r--r--src/or/routerparse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c
index 6f3acd0987..f7687e0e40 100644
--- a/src/or/routerparse.c
+++ b/src/or/routerparse.c
@@ -2630,8 +2630,8 @@ networkstatus_parse_vote_from_string(const char *s, const char **eos_out,
{
smartlist_t *package_lst = find_all_by_keyword(tokens, K_PACKAGE);
+ ns->package_lines = smartlist_new();
if (package_lst) {
- ns->package_lines = smartlist_new();
SMARTLIST_FOREACH(package_lst, directory_token_t *, t,
smartlist_add(ns->package_lines, tor_strdup(t->args[0])));
}