From c64ea2d874bf5b789d2e8926ed51d97923d56480 Mon Sep 17 00:00:00 2001 From: Mark Janssen Date: Wed, 8 Feb 2006 09:18:52 +0000 Subject: [PATCH] Removed some debugging output, moved some to 'verbose' mode Updated darwin makefile git-svn-id: https://proxytunnel.svn.sourceforge.net/svnroot/proxytunnel/trunk/proxytunnel@102 bc163920-b10d-0410-b2c5-a5491ca2ceef --- Makefile.darwin | 2 +- Makefile.no-gcc | 5 ++++- cmdline.c | 7 ++++--- http.c | 6 ++++-- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/Makefile.darwin b/Makefile.darwin index bd85347..2961dfb 100755 --- a/Makefile.darwin +++ b/Makefile.darwin @@ -4,7 +4,7 @@ CC ?= gcc CFLAGS ?= -Wall -DDARWIN -DHAVE_GETOPT_LONG -LDFLAGS ?= -lcrypto +LDFLAGS ?= -lcrypto -lssl INSTALLPATH ?= $(DESTDIR)/usr/local/bin MANPATH ?= $(DESTDIR)/usr/local/man/man1 diff --git a/Makefile.no-gcc b/Makefile.no-gcc index e081d2c..3ee4257 100644 --- a/Makefile.no-gcc +++ b/Makefile.no-gcc @@ -4,13 +4,16 @@ CC ?= cc CFLAGS ?= -LDFLAGS ?= -lssl +CFLAGS += -DUSE_SSL +CFLAGS += -DPROCTITLE +LDFLAGS += -lssl -lcrypto INSTALLPATH ?= $(DESTDIR)/usr/bin PROGNAME = proxytunnel OBJ = proxytunnel.o \ base64.o \ io.o \ + setproctitle.o \ http.o \ ntlm.o \ basicauth.o \ diff --git a/cmdline.c b/cmdline.c index 27ce023..3ec7f86 100755 --- a/cmdline.c +++ b/cmdline.c @@ -212,7 +212,8 @@ int cmdline_parser( int argc, char * const *argv, struct gengetopt_args_info *ar #ifdef USE_SSL case 'e': /* Turn on SSL encryption */ args_info->encrypt_flag = !(args_info->encrypt_flag); - fprintf (stderr, "SSL enabled\n"); + if( args_info.verbose_flag ) + message("SSL enabled\n"); break; #endif @@ -405,7 +406,7 @@ if (args_info->proxy_given ) phost = malloc( 51 ); - fprintf( stderr, "%s: proxyhost (pre parse) given, it is: '%s'\n", PACKAGE, args_info->proxy_arg ); +/* fprintf( stderr, "%s: proxyhost (pre parse) given, it is: '%s'\n", PACKAGE, args_info->proxy_arg ); */ r = sscanf( args_info->proxy_arg, "%50[^:]:%d", phost, &pport ); if ( r == 2 ) { @@ -414,7 +415,7 @@ if (args_info->proxy_given ) args_info->proxyhost_given = 1; args_info->proxyport_given = 1; } - fprintf( stderr, "%s: proxyhost (post parse) is '%s':'%d'\n", PACKAGE, args_info->proxyhost_arg, args_info->proxyport_arg ); +/* fprintf( stderr, "%s: proxyhost (post parse) is '%s':'%d'\n", PACKAGE, args_info->proxyhost_arg, args_info->proxyport_arg ); */ } if ( missing_required_options ) diff --git a/http.c b/http.c index 2100e42..042d149 100644 --- a/http.c +++ b/http.c @@ -91,12 +91,14 @@ void proxy_protocol() */ if (args_info.remproxy_given ) { - message( "Tunneling to %s (remote proxy)\n", args_info.remproxy_arg ); + if( args_info.verbose_flag ) + message( "Tunneling to %s (remote proxy)\n", args_info.remproxy_arg ); sprintf( buf, "CONNECT %s HTTP/1.0\r\n", args_info.remproxy_arg ); } else { - message( "Tunneling to %s (destination)\n", args_info.dest_arg ); + if( args_info.verbose_flag ) + message( "Tunneling to %s (destination)\n", args_info.dest_arg ); sprintf( buf, "CONNECT %s HTTP/1.0\r\n", args_info.dest_arg ); }