[or-cvs] get rid of IgnoreVersion and the forced auto-exit mis-feature

arma at seul.org arma at seul.org
Mon Aug 8 21:52:59 UTC 2005


Update of /home2/or/cvsroot/tor/src/or
In directory moria:/home/arma/work/onion/cvs/tor/src/or

Modified Files:
	config.c or.h routerparse.c 
Log Message:
get rid of IgnoreVersion and the forced auto-exit mis-feature


Index: config.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/config.c,v
retrieving revision 1.381
retrieving revision 1.382
diff -u -d -r1.381 -r1.382
--- config.c	7 Aug 2005 21:58:23 -0000	1.381
+++ config.c	8 Aug 2005 21:52:57 -0000	1.382
@@ -136,7 +136,7 @@
   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"),

Index: or.h
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/or.h,v
retrieving revision 1.636
retrieving revision 1.637
diff -u -d -r1.636 -r1.637
--- or.h	7 Aug 2005 21:24:00 -0000	1.636
+++ or.h	8 Aug 2005 21:52:57 -0000	1.637
@@ -2023,8 +2023,7 @@
 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);

Index: routerparse.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/routerparse.c,v
retrieving revision 1.115
retrieving revision 1.116
diff -u -d -r1.115 -r1.116
--- routerparse.c	24 Jun 2005 23:42:15 -0000	1.115
+++ routerparse.c	8 Aug 2005 21:52:57 -0000	1.116
@@ -313,8 +313,7 @@
 /* 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 @@
     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 @@
 
   /* 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 "))) {



More information about the tor-commits mailing list