diff options
author | Nick Mathewson <nickm@torproject.org> | 2007-09-27 16:08:10 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2007-09-27 16:08:10 +0000 |
commit | 28946069eef5cb980a7a14b4893ee531c9ebd6cb (patch) | |
tree | 4d93909fc27230092b6b9258c73a702a0de9e30d /src/or/routerlist.c | |
parent | ea47287575534eb58c4f3cae6c59b1095af3b92e (diff) | |
download | tor-28946069eef5cb980a7a14b4893ee531c9ebd6cb.tar.gz tor-28946069eef5cb980a7a14b4893ee531c9ebd6cb.zip |
r15412@catbus: nickm | 2007-09-27 12:04:24 -0400
More annotated-store work: handle annotations in lists correctly. Add ability to prepend annotations to a routerdesc (and to every rtouredesc in a list), while verifying that the routerdesc is not already annotated.
svn:r11665
Diffstat (limited to 'src/or/routerlist.c')
-rw-r--r-- | src/or/routerlist.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c index 0ed2c0c489..41dbd126b4 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -3106,7 +3106,7 @@ router_load_single_router(const char *s, uint8_t purpose, const char **msg) tor_assert(msg); *msg = NULL; - if (!(ri = router_parse_entry_from_string(s, NULL, 1, 0))) { + if (!(ri = router_parse_entry_from_string(s, NULL, 1, 0, NULL))) { log_warn(LD_DIR, "Error parsing router descriptor; dropping."); *msg = "Couldn't parse router descriptor."; return -1; @@ -3167,7 +3167,7 @@ router_load_routers_from_string(const char *s, const char *eos, int allow_annotations = (saved_location != SAVED_NOWHERE); router_parse_list_from_string(&s, eos, routers, saved_location, 0, - allow_annotations); + allow_annotations, NULL); routers_update_status_from_networkstatus(routers, !from_cache); @@ -3228,7 +3228,8 @@ router_load_extrainfo_from_string(const char *s, const char *eos, const char *msg; int from_cache = (saved_location != SAVED_NOWHERE); - router_parse_list_from_string(&s, eos, extrainfo_list, saved_location, 1, 0); + router_parse_list_from_string(&s, eos, extrainfo_list, saved_location, 1, 0, + NULL); log_info(LD_DIR, "%d elements to add", smartlist_len(extrainfo_list)); |