diff options
| author | Wilmer van der Gaast <wilmer@gaast.net> | 2011-12-19 19:09:11 +0100 | 
|---|---|---|
| committer | Wilmer van der Gaast <wilmer@gaast.net> | 2011-12-19 19:09:11 +0100 | 
| commit | 9f958f794a1710f17eaae79c64f90f1f66134094 (patch) | |
| tree | 33a94e66beea7bda31317ec2d8cf9847ba109b5e /protocols | |
| parent | a72dc2bb447e754295f8efc6f44fc6572f0f8511 (diff) | |
Pass the SSL errors through another layer of indirection (Passport SOAP code).
Diffstat (limited to 'protocols')
| -rw-r--r-- | protocols/msn/soap.c | 10 | 
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;  	} | 
