aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2006-04-10 08:02:56 +0000
committerNick Mathewson <nickm@torproject.org>2006-04-10 08:02:56 +0000
commit71f1a773712335dccb3076c0a4613db95984fd7a (patch)
tree09b8c93310638a70f7a15df5fa9d939f13d17745
parent53f7a1bb0c84d026cff0478aa8975c202ce84886 (diff)
downloadtor-71f1a773712335dccb3076c0a4613db95984fd7a.tar.gz
tor-71f1a773712335dccb3076c0a4613db95984fd7a.zip
fix bugs in compute_recommended_versions
svn:r6356
-rw-r--r--src/or/routerlist.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index ecd4029e46..db1c9e7976 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -2633,6 +2633,8 @@ compute_recommended_versions(time_t now, int client)
smartlist_split_string(versions, vers, ",",
SPLIT_SKIP_SPACE|SPLIT_IGNORE_BLANK, 0);
sort_version_list(versions, 1);
+ smartlist_add_all(combined, versions);
+ smartlist_free(versions);
});
sort_version_list(combined, 0);
@@ -2645,15 +2647,13 @@ compute_recommended_versions(time_t now, int client)
if (current && !strcmp(cp, current)) {
++n_seen;
} else {
-/* XXX Another case of requiring only half, not more than half -RD */
- if (n_seen >= n_recent/2 && current)
+ if (n_seen > n_recent/2 && current)
smartlist_add(recommended, current);
n_seen = 0;
current = cp;
}
});
-/* XXX and here -RD */
- if (n_seen >= n_recent/2 && current)
+ if (n_seen > n_recent/2 && current)
smartlist_add(recommended, current);
result = smartlist_join_strings(recommended, ", ", 0, NULL);
@@ -2752,7 +2752,7 @@ routers_update_all_from_networkstatus(void)
char *rec = compute_recommended_versions(now, !is_server);
log_notice(LD_GENERAL, "This version of Tor (%s) is newer than any "
"recommended version%s, according to %d/%d recent network "
- "statuses. Versions recommended by at least %d recent "
+ "statuses. Versions recommended by more than %d recent "
"authorit%s are: %s",
VERSION,
consensus == VS_NEW_IN_SERIES ? " in its series" : "",