aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/msn/soap.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2011-12-24 19:02:39 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2011-12-24 19:02:39 +0100
commit164352ef9d3e8b4b2eea8ec64c3b4590b2388b18 (patch)
tree58d3424f7743d89ad4f94fc803ddd7e0563ec251 /protocols/msn/soap.c
parente306fbf84aa37ab934c5ea18ccfd75da041af052 (diff)
parent96f954df218e81f5580257c319b91217dac2f4bf (diff)
Merging mainline.
Diffstat (limited to 'protocols/msn/soap.c')
-rw-r--r--protocols/msn/soap.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/protocols/msn/soap.c b/protocols/msn/soap.c
index 7d9f3791..d9804f49 100644
--- a/protocols/msn/soap.c
+++ b/protocols/msn/soap.c
@@ -59,6 +59,7 @@ struct msn_soap_req_data
void *data;
struct im_connection *ic;
int ttl;
+ char *error;
char *url, *action, *payload;
struct http_request *http_req;
@@ -157,13 +158,17 @@ static void msn_soap_handle_response( struct http_request *http_req )
xt_free( parser );
}
+ if( http_req->status_code != 200 )
+ soap_req->error = g_strdup( http_req->status_string );
+
st = soap_req->handle_response( soap_req );
fail:
g_free( soap_req->url );
g_free( soap_req->action );
g_free( soap_req->payload );
- soap_req->url = soap_req->action = soap_req->payload = NULL;
+ g_free( soap_req->error );
+ soap_req->url = soap_req->action = soap_req->payload = soap_req->error = NULL;
if( st == MSN_SOAP_RETRY && --soap_req->ttl )
{
@@ -252,6 +257,7 @@ static void msn_soap_free( struct msn_soap_req_data *soap_req )
g_free( soap_req->url );
g_free( soap_req->action );
g_free( soap_req->payload );
+ g_free( soap_req->error );
g_free( soap_req );
}
@@ -409,7 +415,7 @@ static int msn_soap_passport_sso_handle_response( struct msn_soap_req_data *soap
if( sd->secret == NULL )
{
- msn_auth_got_passport_token( ic, NULL, sd->error );
+ msn_auth_got_passport_token( ic, NULL, sd->error ? sd->error : soap_req->error );
return MSN_SOAP_OK;
}