diff options
author | Roger Dingledine <arma@torproject.org> | 2008-02-06 12:45:04 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2008-02-06 12:45:04 +0000 |
commit | bbcf406d9fe0c5a51f76e0adb37bf854091246c5 (patch) | |
tree | 33124660b7c7596c84aef1d297fb123fba15d2a4 /src/or/routerparse.c | |
parent | e49d712b8a2a5e7fe75f6f229bc2ab6b175b82e4 (diff) | |
download | tor-bbcf406d9fe0c5a51f76e0adb37bf854091246c5.tar.gz tor-bbcf406d9fe0c5a51f76e0adb37bf854091246c5.zip |
If the networkstatus consensus lists no recommended versions, don't
complain to the user and demand that they upgrade to one of "".
svn:r13401
Diffstat (limited to 'src/or/routerparse.c')
-rw-r--r-- | src/or/routerparse.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c index 1c21715d62..c4ebe857ff 100644 --- a/src/or/routerparse.c +++ b/src/or/routerparse.c @@ -280,7 +280,7 @@ static token_rule_t dir_footer_token_table[] = { END_OF_TABLE }; -/** List of tokens allowable in v1 diectory headers/footers. */ +/** List of tokens allowable in v1 directory headers/footers. */ static token_rule_t dir_token_table[] = { /* don't enforce counts; this is obsolete. */ T( "network-status", K_NETWORK_STATUS, NO_ARGS, NO_OBJ ), @@ -538,7 +538,8 @@ router_append_dirobj_signature(char *buf, size_t buf_len, const char *digest, } /** Return VS_RECOMMENDED if <b>myversion</b> is contained in - * <b>versionlist</b>. Else, return VS_OLD if every member of + * <b>versionlist</b>. Else, return VS_EMPTY if versionlist has no + * entries. Else, return VS_OLD if every member of * <b>versionlist</b> is newer than <b>myversion</b>. Else, return * VS_NEW_IN_SERIES if there is at least one member of <b>versionlist</b> in * the same series (major.minor.micro) as <b>myversion</b>, but no such member @@ -569,6 +570,11 @@ tor_version_is_obsolete(const char *myversion, const char *versionlist) version_sl = smartlist_create(); smartlist_split_string(version_sl, versionlist, ",", SPLIT_SKIP_SPACE, 0); + if (!strlen(versionlist)) { /* no authorities cared or agreed */ + ret = VS_EMPTY; + goto done; + } + SMARTLIST_FOREACH(version_sl, const char *, cp, { if (!strcmpstart(cp, "Tor ")) cp += 4; |