Changeset 2c6b0f4 for protocols/msn
- Timestamp:
- 2010-09-05T14:09:43Z (14 years ago)
- Branches:
- master
- Children:
- 52f5e90
- Parents:
- 975708a
- Location:
- protocols/msn
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/msn/soap.c
r975708a r2c6b0f4 262 262 char *secret; 263 263 char *error; 264 char *redirect; 264 265 }; 265 266 266 267 static int msn_soap_passport_sso_build_request( struct msn_soap_req_data *soap_req ) 267 268 { 269 struct msn_soap_passport_sso_data *sd = soap_req->data; 268 270 struct im_connection *ic = soap_req->ic; 269 271 struct msn_data *md = ic->proto_data; 270 272 271 if( g_str_has_suffix( ic->acc->user, "@msn.com" ) ) 273 if( sd->redirect ) 274 { 275 soap_req->url = sd->redirect; 276 sd->redirect = NULL; 277 } 278 else if( g_str_has_suffix( ic->acc->user, "@msn.com" ) ) 272 279 soap_req->url = g_strdup( SOAP_PASSPORT_SSO_URL_MSN ); 273 280 else … … 312 319 struct xt_node *code = xt_find_node( node->children, "faultcode" ); 313 320 struct xt_node *string = xt_find_node( node->children, "faultstring" ); 321 struct xt_node *url; 314 322 315 323 if( code == NULL || code->text_len == 0 ) 316 324 sd->error = g_strdup( "Unknown error" ); 325 else if( strcmp( code->text, "psf:Redirect" ) == 0 && 326 ( url = xt_find_node( node->children, "psf:redirectUrl" ) ) && 327 url->text_len > 0 ) 328 sd->redirect = g_strdup( url->text ); 317 329 else 318 330 sd->error = g_strdup_printf( "%s (%s)", code->text, string && string->text_len ? … … 378 390 }; 379 391 392 if( sd->redirect ) 393 return MSN_SOAP_RETRY; 394 380 395 if( md->soapq ) 381 396 return msn_soapq_flush( ic, TRUE ); … … 422 437 g_free( sd->secret ); 423 438 g_free( sd->error ); 439 g_free( sd->redirect ); 424 440 425 441 return MSN_SOAP_OK; -
protocols/msn/soap.h
r975708a r2c6b0f4 62 62 63 63 #define SOAP_PASSPORT_SSO_URL "https://login.live.com/RST.srf" 64 #define SOAP_PASSPORT_SSO_URL_MSN "https://msnia.login.live.com/pp 550/RST.srf"64 #define SOAP_PASSPORT_SSO_URL_MSN "https://msnia.login.live.com/pp800/RST.srf" 65 65 66 66 #define SOAP_PASSPORT_SSO_PAYLOAD \
Note: See TracChangeset
for help on using the changeset viewer.