diff options
author | Nick Mathewson <nickm@torproject.org> | 2004-07-22 20:30:02 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2004-07-22 20:30:02 +0000 |
commit | 33fe5e362fa7365ce1274486437a68c4b33d620e (patch) | |
tree | d699fbd03c66d02b4abc8e52578eba1bce08bdc4 /src/or/routerparse.c | |
parent | 0536b853fda14705f5fc2d19dc96bd2a8a90e5c3 (diff) | |
download | tor-33fe5e362fa7365ce1274486437a68c4b33d620e.tar.gz tor-33fe5e362fa7365ce1274486437a68c4b33d620e.zip |
Never use time(NULL) as assumed publication time for a directory.
svn:r2105
Diffstat (limited to 'src/or/routerparse.c')
-rw-r--r-- | src/or/routerparse.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c index 96cf1c3dee..277178f638 100644 --- a/src/or/routerparse.c +++ b/src/or/routerparse.c @@ -393,14 +393,15 @@ router_parse_routerlist_from_directory(const char *str, { routerinfo_t *me = router_get_my_routerinfo(); if(me) - router_update_status_from_smartlist(me, time(NULL), good_nickname_list); + router_update_status_from_smartlist(me, published_on, + good_nickname_list); } /* Read the router list from s, advancing s up past the end of the last * router. */ str = end; if (router_parse_list_from_string(&str, &new_dir, - good_nickname_list)) { + good_nickname_list, published_on)) { log_fn(LOG_WARN, "Error reading routers from directory"); goto err; } @@ -576,7 +577,8 @@ static int check_directory_signature(const char *digest, */ int router_parse_list_from_string(const char **s, routerlist_t **dest, - smartlist_t *good_nickname_list) + smartlist_t *good_nickname_list, + time_t published_on) { routerinfo_t *router; smartlist_t *routers; @@ -607,7 +609,7 @@ router_parse_list_from_string(const char **s, routerlist_t **dest, } if (good_nickname_list) { - router_update_status_from_smartlist(router, time(NULL), + router_update_status_from_smartlist(router, published_on, good_nickname_list); } else { router->is_running = 1; /* start out assuming all dirservers are up */ |