diff options
| author | Wilmer van der Gaast <wilmer@gaast.net> | 2010-08-29 11:39:27 +0200 | 
|---|---|---|
| committer | Wilmer van der Gaast <wilmer@gaast.net> | 2010-08-29 11:39:27 +0200 | 
| commit | 02bb9db2edd535036e030e004a58ed1459c15bb8 (patch) | |
| tree | 703a93ad7a12c652f27d200d7a6d6a16aa4b7d50 | |
| parent | feb1bad3303f9e5b7d6afa0bfe3ad57e8714dc52 (diff) | |
Handle payloads attached to errors (assume any number in cmd[2] would be
a payload length, which seems like a fair assumption). This should solve
problems with logging in with dodgy contact/membership lists.
| -rw-r--r-- | protocols/msn/ns.c | 4 | ||||
| -rw-r--r-- | protocols/nogaim.c | 2 | 
2 files changed, 5 insertions, 1 deletions
| diff --git a/protocols/msn/ns.c b/protocols/msn/ns.c index bd13c3a6..fa445aa7 100644 --- a/protocols/msn/ns.c +++ b/protocols/msn/ns.c @@ -518,6 +518,10 @@ static int msn_ns_command( gpointer data, char **cmd, int num_parts )  			imc_logout( ic, TRUE );  			return( 0 );  		} +		 +		/* Oh yes, errors can have payloads too now. Discard them for now. */ +		if( num_parts >= 3 ) +			md->handler->msglen = atoi( cmd[2] );  	}  	else  	{ diff --git a/protocols/nogaim.c b/protocols/nogaim.c index 10ffd843..aa3ad5bb 100644 --- a/protocols/nogaim.c +++ b/protocols/nogaim.c @@ -251,7 +251,7 @@ void imcb_error( struct im_connection *ic, char *format, ... )  	if( ic->flags & OPT_LOGGED_IN )  		serv_got_crap( ic, "Error: %s", text );  	else -		serv_got_crap( ic, "Couldn't log in: %s", text ); +		serv_got_crap( ic, "Login error: %s", text );  	g_free( text );  } | 
