Improved verbose output, easier for the eyes

git-svn-id: https://proxytunnel.svn.sourceforge.net/svnroot/proxytunnel/trunk/proxytunnel@175 bc163920-b10d-0410-b2c5-a5491ca2ceef
This commit is contained in:
Dag Wieers 2008-01-19 04:05:39 +00:00
parent f2f3d3811b
commit 24b37ca6c6
3 changed files with 9 additions and 8 deletions

View file

@ -5,6 +5,7 @@ Changes to proxytunnel version 1.8.0svn -- Sat Jan 19 04:42:11 CET 2008
- Disable output by default on Windows build (Dag Wieers)
- Headers now have a trailing \r\n (Dag Wieers)
- Updated SPEC file to RPMforge standards (Dag Wieers)
- Improved verbose output, easier for the eyes (Dag Wieers)
Changes to proxytunnel version 1.8.0 -- Mon Dec 31 16:46:52 CET 2007

12
http.c
View file

@ -102,7 +102,7 @@ void print_line_prefix(char *buf, char *prefix)
buf = strdup(buf);
char *cur = strtok(buf, "\r\n");
while ( cur != NULL) {
message( "%s %s\n", prefix, cur );
message( "%s%s\n", prefix, cur );
cur = strtok(NULL, "\r\n");
}
}
@ -136,13 +136,13 @@ void proxy_protocol(PTSTREAM *pts)
if (args_info.remproxy_given )
{
if( args_info.verbose_flag )
message( "Tunneling to %s (remote proxy)\n", args_info.remproxy_arg );
message( "\nTunneling to %s (remote proxy)\n", args_info.remproxy_arg );
sprintf( buf, "CONNECT %s HTTP/1.0\r\n", args_info.remproxy_arg );
}
else
{
if( args_info.verbose_flag )
message( "Tunneling to %s (destination)\n", args_info.dest_arg );
message( "\nTunneling to %s (destination)\n", args_info.dest_arg );
sprintf( buf, "CONNECT %s HTTP/1.0\r\n", args_info.dest_arg );
}
@ -178,7 +178,7 @@ void proxy_protocol(PTSTREAM *pts)
*/
if( args_info.verbose_flag ) {
message( "Connect string sent to local proxy:\n");
print_line_prefix(buf, "->");
print_line_prefix(buf, " đ» ");
}
/*
@ -205,7 +205,7 @@ void proxy_protocol(PTSTREAM *pts)
while ( strcmp( buf, "\r\n" ) != 0 ) readline(pts);
if( args_info.verbose_flag )
message( "Tunneling to %s (destination)\n", args_info.dest_arg );
message( "\nTunneling to %s (destination)\n", args_info.dest_arg );
sprintf( buf, "CONNECT %s HTTP/1.0\r\n", args_info.dest_arg);
/*
@ -220,7 +220,7 @@ void proxy_protocol(PTSTREAM *pts)
*/
if( args_info.verbose_flag ) {
message( "Connect string sent to remote proxy:\n");
print_line_prefix(buf, "->");
print_line_prefix(buf, " » ");
}
/*

4
io.c
View file

@ -65,7 +65,7 @@ int readline(PTSTREAM *pts)
char * dstr = malloc(sizeof(buf) + 1);
strlcpy( dstr, buf, strlen(buf) - 1);
if (strcmp(dstr, ""))
message( "<- %s\n", dstr );
message( " « %s\n", dstr );
}
return strlen( buf );
}
@ -97,7 +97,7 @@ void cpio(PTSTREAM *stream1, PTSTREAM *stream2)
FD_ZERO( &writefds );
if( args_info.verbose_flag )
message( "Tunnel established\n" );
message( "\nTunnel established.\n" );
/*
* Only diamonds are forever :-)