changeset 6777:513fd80bcd2e

[gaim-migrate @ 7315] This looks like it fixes the (null) group problem in MSN. Thanks faceprint. Why it happens, we don't know.. it really shouldn't, and may be a problem in the future... committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Sun, 07 Sep 2003 07:13:48 +0000
parents 46e1c07f4de5
children b8bc8dd411cc
files src/protocols/msn/notification.c
diffstat 1 files changed, 23 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/msn/notification.c	Sun Sep 07 06:55:26 2003 +0000
+++ b/src/protocols/msn/notification.c	Sun Sep 07 07:13:48 2003 +0000
@@ -114,21 +114,6 @@
 			b->proto_data = user;
 	}
 
-	/* Find all occurrences of this buddy in the wrong place. */
-	for (sl = buddies; sl != NULL; sl = sl->next)
-	{
-		b = sl->data;
-
-		if (b->proto_data == NULL)
-		{
-			gaim_debug_warning("msn",
-				"Deleting misplaced user %s (%s) during sync with server.\n",
-				b->name, gaim_find_buddys_group(b)->name);
-
-			gaim_blist_remove_buddy(b);
-		}
-	}
-
 	g_slist_free(buddies);
 
 	serv_got_alias(gc, (char *)msn_user_get_passport(user),
@@ -1260,11 +1245,34 @@
 			while (session->lists.forward != NULL)
 			{
 				MsnUser *user = session->lists.forward->data;
+				GSList *buddies;
+				GSList *sl;
 
 				session->lists.forward =
 					g_slist_remove(session->lists.forward, user);
 
 				add_buddy(servconn, user);
+
+				buddies = gaim_find_buddies(account,
+											msn_user_get_passport(user));
+
+				/* Find all occurrences of this buddy in the wrong place. */
+				for (sl = buddies; sl != NULL; sl = sl->next)
+				{
+					GaimBuddy *b = sl->data;
+
+					if (b->proto_data == NULL)
+					{
+						gaim_debug_warning("msn",
+							"Deleting misplaced user %s (%s) during sync "
+							"with server.\n",
+							b->name, gaim_find_buddys_group(b)->name);
+
+						gaim_blist_remove_buddy(b);
+					}
+				}
+
+				g_slist_free(buddies);
 			}
 
 			session->syncing_lists = FALSE;