diff options
Diffstat (limited to 'protocols/msn/sb.c')
| -rw-r--r-- | protocols/msn/sb.c | 26 | 
1 files changed, 25 insertions, 1 deletions
diff --git a/protocols/msn/sb.c b/protocols/msn/sb.c index 2f4d05d5..11728f03 100644 --- a/protocols/msn/sb.c +++ b/protocols/msn/sb.c @@ -521,11 +521,35 @@ static int msn_sb_command( gpointer data, char **cmd, int num_parts )  			msn_sb_destroy( sb );  			return( 0 );  		} -		else if( err->flags & STATUS_FATAL ) +		if( err->flags & STATUS_FATAL )  		{  			signoff( gc );  			return( 0 );  		} +		if( err->flags & STATUS_SB_IM_SPARE ) +		{ +			if( sb->who ) +			{ +				struct msn_message *m; +				GSList *l; +				 +				/* Apparently some invitation failed. We might want to use this +				   board later, so keep it as a spare. */ +				g_free( sb->who ); +				sb->who = NULL; +				 +				/* Also clear the msgq, otherwise someone else might get them. */ +				for( l = sb->msgq; l; l = l->next ) +				{ +					m = l->data; +					g_free( m->who ); +					g_free( m->text ); +					g_free( m ); +				} +				g_slist_free( sb->msgq ); +				sb->msgq = NULL; +			} +		}  	}  	else  	{  | 
