Only warn about version newness once

svn:r2189
This commit is contained in:
Nick Mathewson 2004-08-07 05:12:08 +00:00
parent dbf150bd4e
commit 3de630ec67

View File

@ -197,6 +197,7 @@ get_recommended_software_from_directory(const char *str)
char *version, *comma, *cp; char *version, *comma, *cp;
tor_version_t mine, other; tor_version_t mine, other;
int found_newer = 0, r; int found_newer = 0, r;
static int warned_too_new=0;
vl = versionlist; vl = versionlist;
@ -234,8 +235,11 @@ get_recommended_software_from_directory(const char *str)
break; break;
} }
if (!found_newer) { if (!found_newer) {
log_fn(LOG_WARN, "This version of Tor (%s) is newer than any on the recommended list (%s)", if (!warned_too_new) {
myversion, versionlist); log_fn(LOG_WARN, "This version of Tor (%s) is newer than any on the recommended list (%s)",
myversion, versionlist);
warned_too_new=1;
}
return 0; return 0;
} else { } else {
return 1; return 1;