comparison src/protocols/msn/notification.c @ 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 addc5c8c0df1
children f5c483cdd1d8
comparison
equal deleted inserted replaced
6776:46e1c07f4de5 6777:513fd80bcd2e
112 } 112 }
113 else 113 else
114 b->proto_data = user; 114 b->proto_data = user;
115 } 115 }
116 116
117 /* Find all occurrences of this buddy in the wrong place. */
118 for (sl = buddies; sl != NULL; sl = sl->next)
119 {
120 b = sl->data;
121
122 if (b->proto_data == NULL)
123 {
124 gaim_debug_warning("msn",
125 "Deleting misplaced user %s (%s) during sync with server.\n",
126 b->name, gaim_find_buddys_group(b)->name);
127
128 gaim_blist_remove_buddy(b);
129 }
130 }
131
132 g_slist_free(buddies); 117 g_slist_free(buddies);
133 118
134 serv_got_alias(gc, (char *)msn_user_get_passport(user), 119 serv_got_alias(gc, (char *)msn_user_get_passport(user),
135 (char *)msn_user_get_name(user)); 120 (char *)msn_user_get_name(user));
136 121
1258 account->deny); 1243 account->deny);
1259 1244
1260 while (session->lists.forward != NULL) 1245 while (session->lists.forward != NULL)
1261 { 1246 {
1262 MsnUser *user = session->lists.forward->data; 1247 MsnUser *user = session->lists.forward->data;
1248 GSList *buddies;
1249 GSList *sl;
1263 1250
1264 session->lists.forward = 1251 session->lists.forward =
1265 g_slist_remove(session->lists.forward, user); 1252 g_slist_remove(session->lists.forward, user);
1266 1253
1267 add_buddy(servconn, user); 1254 add_buddy(servconn, user);
1255
1256 buddies = gaim_find_buddies(account,
1257 msn_user_get_passport(user));
1258
1259 /* Find all occurrences of this buddy in the wrong place. */
1260 for (sl = buddies; sl != NULL; sl = sl->next)
1261 {
1262 GaimBuddy *b = sl->data;
1263
1264 if (b->proto_data == NULL)
1265 {
1266 gaim_debug_warning("msn",
1267 "Deleting misplaced user %s (%s) during sync "
1268 "with server.\n",
1269 b->name, gaim_find_buddys_group(b)->name);
1270
1271 gaim_blist_remove_buddy(b);
1272 }
1273 }
1274
1275 g_slist_free(buddies);
1268 } 1276 }
1269 1277
1270 session->syncing_lists = FALSE; 1278 session->syncing_lists = FALSE;
1271 session->lists_synced = TRUE; 1279 session->lists_synced = TRUE;
1272 } 1280 }