Commit 3ac34ae3 authored by Roger Dingledine's avatar Roger Dingledine
Browse files

get rid of IgnoreVersion and the forced auto-exit mis-feature


svn:r4746
parent 1dd514f2
......@@ -136,7 +136,7 @@ static config_var_t _option_vars[] = {
VAR("HttpProxyAuthenticator",STRING, HttpProxyAuthenticator,NULL),
VAR("HttpsProxy", STRING, HttpsProxy, NULL),
VAR("HttpsProxyAuthenticator",STRING,HttpsProxyAuthenticator,NULL),
VAR("IgnoreVersion", BOOL, IgnoreVersion, "0"),
OBSOLETE("IgnoreVersion"),
VAR("KeepalivePeriod", INTERVAL, KeepalivePeriod, "5 minutes"),
VAR("Log", LINELIST, Logs, NULL),
OBSOLETE("LinkPadding"),
......
......@@ -2023,8 +2023,7 @@ running_routers_t *router_parse_runningrouters(const char *str,
routerinfo_t *router_parse_entry_from_string(const char *s, const char *end);
int router_add_exit_policy_from_string(routerinfo_t *router, const char *s);
addr_policy_t *router_parse_addr_policy_from_string(const char *s);
int check_software_version_against_directory(const char *directory,
int ignoreversion);
int check_software_version_against_directory(const char *directory);
int tor_version_parse(const char *s, tor_version_t *out);
int tor_version_as_new_as(const char *platform, const char *cutoff);
int tor_version_compare(tor_version_t *a, tor_version_t *b);
......
......@@ -313,8 +313,7 @@ get_recommended_software_from_directory(const char *str)
/* Return 0 if myversion is supported; else log a message and return
* -1 (or exit if ignoreversions is false) */
int
check_software_version_against_directory(const char *directory,
int ignoreversion)
check_software_version_against_directory(const char *directory)
{
char *v;
v = get_recommended_software_from_directory(directory);
......@@ -326,21 +325,11 @@ check_software_version_against_directory(const char *directory,
tor_free(v);
return 0;
}
log(ignoreversion ? LOG_WARN : LOG_ERR,
log(LOG_WARN,
"You are running Tor version %s, which will not work with this network.\n"
"Please use %s%s.",
VERSION, strchr(v,',') ? "one of " : "", v);
tor_free(v);
if (ignoreversion) {
log(LOG_WARN, "IgnoreVersion is set. If it breaks, we told you so.");
return -1;
} else {
fflush(0);
tor_cleanup();
exit(0);
return -1; /* never reached */
}
}
/** Parse a directory from <b>str</b> and, when done, store the
......@@ -417,7 +406,7 @@ router_parse_routerlist_from_directory(const char *str,
/* Now that we know the signature is okay, check the version. */
if (check_version)
check_software_version_against_directory(str, get_options()->IgnoreVersion);
check_software_version_against_directory(str);
/* Now try to parse the first part of the directory. */
if ((end = strstr(str,"\nrouter "))) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment