diff options
| -rw-r--r-- | lib/http_client.c | 10 | ||||
| -rw-r--r-- | lib/xmltree.c | 2 | ||||
| -rw-r--r-- | protocols/msn/soap.c | 2 | 
3 files changed, 10 insertions, 4 deletions
| diff --git a/lib/http_client.c b/lib/http_client.c index 8bd543af..56a6f376 100644 --- a/lib/http_client.c +++ b/lib/http_client.c @@ -278,6 +278,9 @@ got_reply:  	*end1 = 0; +	if( getenv( "BITLBEE_DEBUG" ) ) +		printf( "HTTP response headers:\n%s", req->reply_headers ); +	  	if( evil_server )  		req->reply_body = end1 + 1;  	else @@ -414,6 +417,9 @@ got_reply:  		req->fd = -1;  		req->ssl = NULL; +		if( getenv( "BITLBEE_DEBUG" ) ) +			printf( "New headers for redirected HTTP request:\n%s", new_request ); +	  		if( new_proto == PROTO_HTTPS )  		{  			req->ssl = ssl_connect( new_host, new_port, http_ssl_connected, req ); @@ -455,6 +461,10 @@ cleanup:  	else  		closesocket( req->fd ); +	if( getenv( "BITLBEE_DEBUG" ) && req ) +		printf( "Finishing HTTP request with status: %s", +		        req->status_string ? req->status_string : "NULL" ); +	  	req->func( req );  	http_free( req );  	return FALSE; diff --git a/lib/xmltree.c b/lib/xmltree.c index c4f34cd9..7dd7b6a3 100644 --- a/lib/xmltree.c +++ b/lib/xmltree.c @@ -322,7 +322,6 @@ char *xt_to_string( struct xt_node *node )  	return real;  } -#ifdef DEBUG  void xt_print( struct xt_node *node )  {  	int i; @@ -381,7 +380,6 @@ void xt_print( struct xt_node *node )  	/* Non-empty tag is now finished. */  	printf( "</%s>\n", node->name );  } -#endif  struct xt_node *xt_dup( struct xt_node *node )  { diff --git a/protocols/msn/soap.c b/protocols/msn/soap.c index 467429fb..ea9a0699 100644 --- a/protocols/msn/soap.c +++ b/protocols/msn/soap.c @@ -222,7 +222,6 @@ static void msn_soap_debug_print( const char *headers, const char *payload )  			st = write( 1, headers, strlen( headers ) );  	} -#ifdef DEBUG  	if( payload )  	{  		struct xt_node *xt = xt_from_string( payload ); @@ -230,7 +229,6 @@ static void msn_soap_debug_print( const char *headers, const char *payload )  			xt_print( xt );  		xt_free_node( xt );  	} -#endif  }  int msn_soapq_flush( struct im_connection *ic, gboolean resend ) | 
