aboutsummaryrefslogtreecommitdiff
path: root/src/or/routerparse.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/routerparse.c')
-rw-r--r--src/or/routerparse.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c
index 6546d19402..250d1cd062 100644
--- a/src/or/routerparse.c
+++ b/src/or/routerparse.c
@@ -923,7 +923,7 @@ router_parse_list_from_string(const char **s, const char *eos,
{
routerinfo_t *router;
extrainfo_t *extrainfo;
- signed_descriptor_t *signed_desc;
+ signed_descriptor_t *signed_desc = NULL;
void *elt;
const char *end, *start;
int have_extrainfo;
@@ -980,6 +980,7 @@ router_parse_list_from_string(const char **s, const char *eos,
continue;
}
if (saved_location != SAVED_NOWHERE) {
+ tor_assert(signed_desc);
signed_desc->saved_location = saved_location;
signed_desc->saved_offset = *s - start;
}
@@ -1899,8 +1900,6 @@ routerstatus_parse_entry_from_string(memarea_t *area,
rs->is_possible_guard = 1;
else if (!strcmp(tok->args[i], "BadExit"))
rs->is_bad_exit = 1;
- else if (!strcmp(tok->args[i], "BadDirectory"))
- rs->is_bad_directory = 1;
else if (!strcmp(tok->args[i], "Authority"))
rs->is_authority = 1;
else if (!strcmp(tok->args[i], "Unnamed") &&
@@ -1917,12 +1916,9 @@ routerstatus_parse_entry_from_string(memarea_t *area,
rs->version_known = 1;
if (strcmpstart(tok->args[0], "Tor ")) {
rs->version_supports_microdesc_cache = 1;
- rs->version_supports_optimistic_data = 1;
} else {
rs->version_supports_microdesc_cache =
tor_version_supports_microdescriptors(tok->args[0]);
- rs->version_supports_optimistic_data =
- tor_version_as_new_as(tok->args[0], "0.2.3.1-alpha");
rs->version_supports_extend2_cells =
tor_version_as_new_as(tok->args[0], "0.2.4.8-alpha");
}
@@ -3243,8 +3239,8 @@ networkstatus_parse_detached_signatures(const char *s, const char *eos)
* AF_UNSPEC for '*'. Use policy_expand_unspec() to turn this into a pair
* of AF_INET and AF_INET6 items.
*/
-addr_policy_t *
-router_parse_addr_policy_item_from_string(const char *s, int assume_action)
+MOCK_IMPL(addr_policy_t *,
+router_parse_addr_policy_item_from_string,(const char *s, int assume_action))
{
directory_token_t *tok = NULL;
const char *cp, *eos;