diff options
Diffstat (limited to 'protocols/msn')
-rw-r--r-- | protocols/msn/ns.c | 3 | ||||
-rw-r--r-- | protocols/msn/sb.c | 6 | ||||
-rw-r--r-- | protocols/msn/soap.c | 21 |
3 files changed, 13 insertions, 17 deletions
diff --git a/protocols/msn/ns.c b/protocols/msn/ns.c index 604e2f4e..e144a8d2 100644 --- a/protocols/msn/ns.c +++ b/protocols/msn/ns.c @@ -479,7 +479,8 @@ static int msn_ns_command( struct msn_handler_data *handler, char **cmd, int num } else { - imcb_error( ic, "Session terminated by remote server (reason unknown)" ); + imcb_error( ic, "Session terminated by remote server (%s)", + cmd[1] ? cmd[1] : "reason unknown)" ); } imc_logout( ic, allow_reconnect ); diff --git a/protocols/msn/sb.c b/protocols/msn/sb.c index 37ac2889..69114469 100644 --- a/protocols/msn/sb.c +++ b/protocols/msn/sb.c @@ -307,7 +307,6 @@ gboolean msn_sb_connected( gpointer data, gint source, b_input_condition cond ) { struct msn_switchboard *sb = data; struct im_connection *ic; - struct msn_data *md; char buf[1024]; /* Are we still alive? */ @@ -315,7 +314,6 @@ gboolean msn_sb_connected( gpointer data, gint source, b_input_condition cond ) return FALSE; ic = sb->ic; - md = ic->proto_data; if( source != sb->fd ) { @@ -674,16 +672,12 @@ static int msn_sb_message( struct msn_handler_data *handler, char *msg, int msgl struct msn_switchboard *sb = handler->data; struct im_connection *ic = sb->ic; char *body; - int blen = 0; if( !num_parts ) return( 1 ); if( ( body = strstr( msg, "\r\n\r\n" ) ) ) - { body += 4; - blen = msglen - ( body - msg ); - } if( strcmp( cmd[0], "MSG" ) == 0 ) { diff --git a/protocols/msn/soap.c b/protocols/msn/soap.c index dac46a75..7d9f3791 100644 --- a/protocols/msn/soap.c +++ b/protocols/msn/soap.c @@ -209,24 +209,25 @@ static char *msn_soap_abservice_build( const char *body_fmt, const char *scenari static void msn_soap_debug_print( const char *headers, const char *payload ) { char *s; - int st; if( !getenv( "BITLBEE_DEBUG" ) ) return; - if( ( s = strstr( headers, "\r\n\r\n" ) ) ) - st = write( 1, s, s - headers + 4 ); - else - st = write( 1, headers, strlen( headers ) ); + if( headers ) + { + if( ( s = strstr( headers, "\r\n\r\n" ) ) ) + write( 2, headers, s - headers + 4 ); + else + write( 2, headers, strlen( headers ) ); + } -#ifdef DEBUG + if( payload ) { struct xt_node *xt = xt_from_string( payload ); if( xt ) xt_print( xt ); xt_free_node( xt ); } -#endif } int msn_soapq_flush( struct im_connection *ic, gboolean resend ) @@ -660,7 +661,7 @@ static xt_status msn_soap_memlist_member( struct xt_node *node, gpointer data ) bd->flags |= MSN_BUDDY_PL; if( getenv( "BITLBEE_DEBUG" ) ) - printf( "%p %s %d\n", bu, handle, bd->flags ); + fprintf( stderr, "%p %s %d\n", bu, handle, bd->flags ); return XT_HANDLED; } @@ -807,7 +808,7 @@ static xt_status msn_soap_addressbook_group( struct xt_node *node, gpointer data } if( getenv( "BITLBEE_DEBUG" ) ) - printf( "%s %s\n", id, name ); + fprintf( stderr, "%s %s\n", id, name ); return XT_HANDLED; } @@ -868,7 +869,7 @@ static xt_status msn_soap_addressbook_contact( struct xt_node *node, gpointer da imcb_add_buddy( ic, handle, group->name ); if( getenv( "BITLBEE_DEBUG" ) ) - printf( "%s %s %s %s\n", id, type, handle, display_name ); + fprintf( stderr, "%s %s %s %s\n", id, type, handle, display_name ); return XT_HANDLED; } |