diff options
Diffstat (limited to 'protocols/msn/soap.c')
-rw-r--r-- | protocols/msn/soap.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/protocols/msn/soap.c b/protocols/msn/soap.c index 909f6ad9..7024bbaa 100644 --- a/protocols/msn/soap.c +++ b/protocols/msn/soap.c @@ -209,14 +209,15 @@ 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" ) ) ) - write( 1, s, s - headers + 4 ); + st = write( 1, s, s - headers + 4 ); else - write( 1, headers, strlen( headers ) ); + st = write( 1, headers, strlen( headers ) ); #ifdef DEBUG { @@ -282,6 +283,7 @@ static int msn_soap_passport_sso_build_request( struct msn_soap_req_data *soap_r soap_req->url = g_strdup( SOAP_PASSPORT_SSO_URL ); strncpy( pass, ic->acc->pass, MAX_PASSPORT_PWLEN ); + pass[MAX_PASSPORT_PWLEN] = '\0'; soap_req->payload = g_markup_printf_escaped( SOAP_PASSPORT_SSO_PAYLOAD, ic->acc->user, pass, md->pp_policy ); @@ -439,6 +441,7 @@ static int msn_soap_passport_sso_free_data( struct msn_soap_req_data *soap_req ) g_free( sd->secret ); g_free( sd->error ); g_free( sd->redirect ); + g_free( sd ); return MSN_SOAP_OK; } @@ -526,12 +529,16 @@ static int msn_soap_oim_handle_response( struct msn_soap_req_data *soap_req ) } else if( soap_req->http_req->status_code == 200 ) { + /* Noise.. imcb_log( soap_req->ic, "Offline message successfully delivered to %s", oim->to ); + */ return MSN_SOAP_OK; } else { - imcb_log( soap_req->ic, "Failed to deliver offline message to %s:\n%s", oim->to, oim->msg ); + char *dec = frombase64( oim->msg ); + imcb_log( soap_req->ic, "Failed to deliver offline message to %s:\n%s", oim->to, dec ); + g_free( dec ); return MSN_SOAP_ABORT; } } |