diff options
author | Roger Dingledine <arma@torproject.org> | 2004-07-22 06:03:53 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2004-07-22 06:03:53 +0000 |
commit | b48cdc9d4035217b2d4d160778092e104fcd91f9 (patch) | |
tree | 47dcbc2e9df8470a4c5afff9d05ebc63e03d09ac /src/or/routerparse.c | |
parent | 38d8e36919e6ae699a0b76c355e5a171b837bbf4 (diff) | |
download | tor-b48cdc9d4035217b2d4d160778092e104fcd91f9.tar tor-b48cdc9d4035217b2d4d160778092e104fcd91f9.tar.gz |
populate router_get_my_routerinfo()->is_verified
svn:r2097
Diffstat (limited to 'src/or/routerparse.c')
-rw-r--r-- | src/or/routerparse.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c index d25f2d17c..96cf1c3de 100644 --- a/src/or/routerparse.c +++ b/src/or/routerparse.c @@ -313,8 +313,8 @@ int check_software_version_against_directory(const char *directory, */ int /* Should be static; exposed for unit tests */ router_parse_routerlist_from_directory(const char *str, - routerlist_t **dest, - crypto_pk_env_t *pkey) + routerlist_t **dest, + crypto_pk_env_t *pkey) { directory_token_t *tok; char digest[DIGEST_LEN]; @@ -389,11 +389,18 @@ router_parse_routerlist_from_directory(const char *str, } tok->n_args = 0; /* Don't free the strings in good_nickname_lst yet. */ + /* Determine if my routerinfo is considered verified. */ + { + routerinfo_t *me = router_get_my_routerinfo(); + if(me) + router_update_status_from_smartlist(me, time(NULL), 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)) { log_fn(LOG_WARN, "Error reading routers from directory"); goto err; } |