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

[or-cvs] r10351: If Tor is invoked from something that isn't a shell (e.g. Vi (in tor/trunk: . src/or)



Author: arma
Date: 2007-05-26 04:04:15 -0400 (Sat, 26 May 2007)
New Revision: 10351

Modified:
   tor/trunk/ChangeLog
   tor/trunk/src/or/config.c
Log:
If Tor is invoked from something that isn't a shell (e.g. Vidalia),
now we expand "-f ~/.tor/torrc" correctly. Suggested by Matt Edman.


Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog	2007-05-26 07:42:06 UTC (rev 10350)
+++ tor/trunk/ChangeLog	2007-05-26 08:04:15 UTC (rev 10351)
@@ -112,6 +112,8 @@
       allows DNSPort to work sensibly with hidden service users.  By
       default, .exit and .onion addresses are remapped; the list of
       patterns can be reconfigured with AutomapHostsSuffixes.
+    - If Tor is invoked from something that isn't a shell (e.g. Vidalia),
+      now we expand "-f ~/.tor/torrc" correctly. Suggested by Matt Edman.
 
   o Removed features:
     - Removed support for the old binary "version 0" controller protocol.

Modified: tor/trunk/src/or/config.c
===================================================================
--- tor/trunk/src/or/config.c	2007-05-26 07:42:06 UTC (rev 10350)
+++ tor/trunk/src/or/config.c	2007-05-26 08:04:15 UTC (rev 10351)
@@ -3184,7 +3184,13 @@
         log(LOG_WARN, LD_CONFIG, "Duplicate -f options on command line.");
         tor_free(fname);
       }
+#ifdef MS_WINDOWS
+      /* XXX one day we might want to extend expand_filename to work
+       * under Windows as well. */
       fname = tor_strdup(argv[i+1]);
+#else
+      fname = expand_filename(argv[i+1]);
+#endif
       using_default_torrc = 0;
       ++i;
     } else if (!strcmp(argv[i],"--ignore-missing-torrc")) {