diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ssl_gnutls.c | 4 | ||||
-rw-r--r-- | lib/ssl_openssl.c | 4 | ||||
-rw-r--r-- | lib/xmltree.c | 12 |
3 files changed, 14 insertions, 6 deletions
diff --git a/lib/ssl_gnutls.c b/lib/ssl_gnutls.c index 15c23dbb..4fc7c33f 100644 --- a/lib/ssl_gnutls.c +++ b/lib/ssl_gnutls.c @@ -188,7 +188,7 @@ int ssl_read( void *conn, char *buf, int len ) if( st == GNUTLS_E_AGAIN || st == GNUTLS_E_INTERRUPTED ) ssl_errno = SSL_AGAIN; - if( getenv( "BITLBEE_DEBUG" ) && st > 0 ) write( 1, buf, st ); + if( 0 && getenv( "BITLBEE_DEBUG" ) && st > 0 ) write( 1, buf, st ); return st; } @@ -209,7 +209,7 @@ int ssl_write( void *conn, const char *buf, int len ) if( st == GNUTLS_E_AGAIN || st == GNUTLS_E_INTERRUPTED ) ssl_errno = SSL_AGAIN; - if( getenv( "BITLBEE_DEBUG" ) && st > 0 ) write( 1, buf, st ); + if( 0 && getenv( "BITLBEE_DEBUG" ) && st > 0 ) write( 1, buf, st ); return st; } diff --git a/lib/ssl_openssl.c b/lib/ssl_openssl.c index 0feed4ca..e0143791 100644 --- a/lib/ssl_openssl.c +++ b/lib/ssl_openssl.c @@ -206,7 +206,7 @@ int ssl_read( void *conn, char *buf, int len ) ssl_errno = SSL_AGAIN; } - if( getenv( "BITLBEE_DEBUG" ) && st > 0 ) write( 1, buf, st ); + if( 0 && getenv( "BITLBEE_DEBUG" ) && st > 0 ) write( 1, buf, st ); return st; } @@ -223,7 +223,7 @@ int ssl_write( void *conn, const char *buf, int len ) st = SSL_write( ((struct scd*)conn)->ssl, buf, len ); - if( getenv( "BITLBEE_DEBUG" ) && st > 0 ) write( 1, buf, st ); + if( 0 && getenv( "BITLBEE_DEBUG" ) && st > 0 ) write( 1, buf, st ); ssl_errno = SSL_OK; if( st <= 0 ) diff --git a/lib/xmltree.c b/lib/xmltree.c index 3ec7e673..bee9007f 100644 --- a/lib/xmltree.c +++ b/lib/xmltree.c @@ -337,7 +337,11 @@ void xt_print( struct xt_node *node ) /* Print the attributes */ for( i = 0; node->attr[i].key; i ++ ) - printf( " %s=\"%s\"", node->attr[i].key, g_markup_escape_text( node->attr[i].value, -1 ) ); + { + char *v = g_markup_escape_text( node->attr[i].value, -1 ); + printf( " %s=\"%s\"", node->attr[i].key, v ); + g_free( v ); + } /* /> in case there's really *nothing* inside this tag, otherwise just >. */ @@ -357,7 +361,11 @@ void xt_print( struct xt_node *node ) { for( i = 0; node->text[i] && isspace( node->text[i] ); i ++ ); if( node->text[i] ) - printf( "%s", g_markup_escape_text( node->text, -1 ) ); + { + char *v = g_markup_escape_text( node->text, -1 ); + printf( "%s", v ); + g_free( v ); + } } if( node->children ) |