[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] backport: get rid of IgnoreVersion and the forced auto-exit...



Update of /home/or/cvsroot/tor/src/or
In directory moria:/home/arma/work/onion/tor-010x/tor/src/or

Modified Files:
      Tag: tor-0_1_0-patches
	config.c or.h routerparse.c 
Log Message:
backport: get rid of IgnoreVersion and the forced auto-exit mis-feature


Index: config.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/config.c,v
retrieving revision 1.353.2.6
retrieving revision 1.353.2.7
diff -u -d -r1.353.2.6 -r1.353.2.7
--- config.c	9 Sep 2005 22:50:00 -0000	1.353.2.6
+++ config.c	11 Sep 2005 22:37:19 -0000	1.353.2.7
@@ -140,7 +140,7 @@
   VAR("HiddenServicePort",   LINELIST_S, RendConfigLines,    NULL),
   VAR("HiddenServiceNodes",  LINELIST_S, RendConfigLines,    NULL),
   VAR("HiddenServiceExcludeNodes", LINELIST_S, RendConfigLines, NULL),
-  VAR("IgnoreVersion",       BOOL,     IgnoreVersion,        "0"),
+  OBSOLETE("IgnoreVersion"),
   VAR("KeepalivePeriod",     INTERVAL, KeepalivePeriod,      "5 minutes"),
   VAR("Log",                 LINELIST, Logs,                 NULL),
   VAR("LogLevel",            LINELIST_S, OldLogOptions,      NULL),

Index: or.h
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/or.h,v
retrieving revision 1.610.2.2
retrieving revision 1.610.2.3
diff -u -d -r1.610.2.2 -r1.610.2.3
--- or.h	7 Aug 2005 19:40:17 -0000	1.610.2.2
+++ or.h	11 Sep 2005 22:37:20 -0000	1.610.2.3
@@ -1880,8 +1880,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: /home/or/cvsroot/tor/src/or/routerparse.c,v
retrieving revision 1.110
retrieving revision 1.110.2.1
diff -u -d -r1.110 -r1.110.2.1
--- routerparse.c	17 May 2005 17:01:36 -0000	1.110
+++ routerparse.c	11 Sep 2005 22:37:20 -0000	1.110.2.1
@@ -308,10 +308,8 @@
   return ret;
 }
 
-/* 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)
+/* Return 0 if myversion is supported; else warn and return -1. */
+int check_software_version_against_directory(const char *directory)
 {
   char *v;
   v = get_recommended_software_from_directory(directory);
@@ -323,21 +321,12 @@
     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 */
-  }
+  return -1;
 }
 
 /** Parse a directory from <b>str</b> and, when done, store the
@@ -414,7 +403,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 "))) {