changeset 30697:a37aa0ddfc0f

Remove a buddy that left a chat from an internal list. Otherwise, the don't-add-multiple-endpoints stuff would not re-add them if re-invited and re-joined. Fixes #11505.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Sat, 17 Jul 2010 23:28:20 +0000
parents 88a047f92c39
children e874875a74a7
files libpurple/protocols/msn/switchboard.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/switchboard.c	Sat Jul 17 23:10:39 2010 +0000
+++ b/libpurple/protocols/msn/switchboard.c	Sat Jul 17 23:28:20 2010 +0000
@@ -740,8 +740,13 @@
 	else if ((swboard->current_users > 1) ||
 			 (purple_conversation_get_type(swboard->conv) == PURPLE_CONV_TYPE_CHAT))
 	{
+		GList *passport;
 		/* This is a switchboard used for a chat */
 		purple_conv_chat_remove_user(PURPLE_CONV_CHAT(swboard->conv), user, NULL);
+
+		passport = g_list_find_custom(swboard->users, user, (GCompareFunc)strcmp);
+		g_free(passport->data);
+		swboard->users = g_list_delete_link(swboard->users, passport);
 		swboard->current_users--;
 		if (swboard->current_users == 0)
 			msn_switchboard_destroy(swboard);