aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/msn/ns.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2010-08-15 14:23:03 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2010-08-15 14:23:03 +0100
commit660cb00687dbe0abd37e705a2923d1cf8bf6f45c (patch)
tree42f432e33f19733b7d2e7c38255fe0071ec720a1 /protocols/msn/ns.c
parent5a7af1ba940521a65b3611e5f96ffa9306497e45 (diff)
Parse authentication errors.
Diffstat (limited to 'protocols/msn/ns.c')
-rw-r--r--protocols/msn/ns.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/protocols/msn/ns.c b/protocols/msn/ns.c
index a599b0ba..2449c8d5 100644
--- a/protocols/msn/ns.c
+++ b/protocols/msn/ns.c
@@ -696,7 +696,7 @@ static int msn_ns_message( gpointer data, char *msg, int msglen, char **cmd, int
return( 1 );
}
-void msn_auth_got_passport_token( struct im_connection *ic, char *token )
+void msn_auth_got_passport_token( struct im_connection *ic, const char *token, const char *error )
{
struct msn_data *md;
@@ -706,12 +706,18 @@ void msn_auth_got_passport_token( struct im_connection *ic, char *token )
md = ic->proto_data;
+ if( token )
{
char buf[1536];
g_snprintf( buf, sizeof( buf ), "USR %d SSO S %s %s\r\n", ++md->trId, md->tokens[0], token );
msn_write( ic, buf, strlen( buf ) );
}
+ else
+ {
+ imcb_error( ic, "Error during Passport authentication: %s", error );
+ imc_logout( ic, TRUE );
+ }
}
void msn_auth_got_contact_list( struct im_connection *ic )