[or-cvs] [torsocks/master 4/5] Always print error messages.

hoganrobert at torproject.org hoganrobert at torproject.org
Mon Sep 20 20:40:09 UTC 2010


Author: Robert Hogan <robert at roberthogan.net>
Date: Mon, 20 Sep 2010 20:19:46 +0100
Subject: Always print error messages.
Commit: dfaf9e799092d1b901270b7492ab727739d60898

Allow error logging by default.
---
 configure.in |    4 ----
 src/tsocks.c |    7 +------
 2 files changed, 1 insertions(+), 10 deletions(-)

diff --git a/configure.in b/configure.in
index 9d8a1e2..9a41cf1 100644
--- a/configure.in
+++ b/configure.in
@@ -189,10 +189,6 @@ if test "${enable_oldmethod}" = "yes"; then
   oldmethod="yes"
 fi
 
-if test "x${enable_debug}" != "x"; then
-  AC_DEFINE([ALLOW_MSG_OUTPUT],[],[Description])
-fi
-
 AC_DEFINE([HOSTNAMES],[0],[Description])
 
 if test "x${enable_hostnames}" = "xyes"; then
diff --git a/src/tsocks.c b/src/tsocks.c
index 3773bb0..80f7b9c 100644
--- a/src/tsocks.c
+++ b/src/tsocks.c
@@ -255,24 +255,19 @@ void tsocks_init(void)
 static int get_environment()
 {
     static int done = 0;
-#ifdef ALLOW_MSG_OUTPUT
     int loglevel = MSGERR;
     char *logfile = NULL;
     char *env;
-#endif
+
     if (done)
         return(0);
 
    /* Determine the logging level */
-#ifndef ALLOW_MSG_OUTPUT
-    set_log_options(-1, (char *)stderr, 0);
-#else
     if ((env = getenv("TORSOCKS_DEBUG")))
         loglevel = atoi(env);
     if (((env = getenv("TORSOCKS_DEBUG_FILE"))) && !suid)
         logfile = env;
     set_log_options(loglevel, logfile, 1);
-#endif
 
     done = 1;
 
-- 
1.7.1




More information about the tor-commits mailing list