comparison src/protocols/msn/userlist.c @ 9225:554ef91db2dd

[gaim-migrate @ 10021] Another fix, like the previous time, and some #if 0'd debug info. The MSN servers are doing something they're not supposed to do, it seems. We're investigating. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Sun, 06 Jun 2004 20:45:53 +0000
parents f46154d6de2b
children d326dd512662
comparison
equal deleted inserted replaced
9224:3e0cd1c6ddc7 9225:554ef91db2dd
244 244
245 gaim_debug_info("msn", 245 gaim_debug_info("msn",
246 "%s has added you to his or her contact list.\n", 246 "%s has added you to his or her contact list.\n",
247 passport); 247 passport);
248 248
249 #if 0
250 gaim_debug_misc("msn", "User's list op = %d\n", user->list_op);
251 gaim_debug_misc("msn", "FL = %d\n", (user->list_op & MSN_LIST_FL_OP));
252 gaim_debug_misc("msn", "AL = %d\n", (user->list_op & MSN_LIST_AL_OP));
253 gaim_debug_misc("msn", "BL = %d\n", (user->list_op & MSN_LIST_BL_OP));
254 gaim_debug_misc("msn", "RL = %d\n", (user->list_op & MSN_LIST_RL_OP));
255 #endif
256
249 if (!(user->list_op & (MSN_LIST_AL_OP | MSN_LIST_BL_OP | 257 if (!(user->list_op & (MSN_LIST_AL_OP | MSN_LIST_BL_OP |
250 MSN_LIST_FL_OP))) 258 MSN_LIST_FL_OP)))
251 { 259 {
252 got_new_entry(gc, passport, friendly); 260 got_new_entry(gc, passport, friendly);
253 } 261 }
365 if (list_op & MSN_LIST_RL_OP) 373 if (list_op & MSN_LIST_RL_OP)
366 { 374 {
367 /* These are users who have us on their contact list. */ 375 /* These are users who have us on their contact list. */
368 /* TODO: what does store name is when this happens? */ 376 /* TODO: what does store name is when this happens? */
369 377
370 if (!(list_op & (MSN_LIST_AL_OP | MSN_LIST_BL_OP))) 378 if (!(list_op & (MSN_LIST_AL_OP | MSN_LIST_BL_OP |
379 MSN_LIST_FL_OP)))
380 {
371 got_new_entry(gc, passport, store); 381 got_new_entry(gc, passport, store);
382 }
372 } 383 }
373 384
374 user->list_op = list_op; 385 user->list_op = list_op;
375 } 386 }
376 387
411 } 422 }
412 423
413 void 424 void
414 msn_userlist_add_user(MsnUserList *userlist, MsnUser *user) 425 msn_userlist_add_user(MsnUserList *userlist, MsnUser *user)
415 { 426 {
427 gaim_debug_misc("msn", "[%p] Adding %s (%p)\n",
428 userlist, user->passport, user);
416 userlist->users = g_list_append(userlist->users, user); 429 userlist->users = g_list_append(userlist->users, user);
417 } 430 }
418 431
419 void 432 void
420 msn_userlist_remove_user(MsnUserList *userlist, MsnUser *user) 433 msn_userlist_remove_user(MsnUserList *userlist, MsnUser *user)
432 for (l = userlist->users; l != NULL; l = l->next) 445 for (l = userlist->users; l != NULL; l = l->next)
433 { 446 {
434 MsnUser *user = (MsnUser *)l->data; 447 MsnUser *user = (MsnUser *)l->data;
435 448
436 g_return_val_if_fail(user->passport != NULL, NULL); 449 g_return_val_if_fail(user->passport != NULL, NULL);
450
451 #if 0
452 gaim_debug_misc("msn", "[%p] Comparing '%s' and '%s' (%p)\n",
453 userlist, passport, user->passport, user);
454 #endif
437 455
438 if (!strcmp(passport, user->passport)) 456 if (!strcmp(passport, user->passport))
439 return user; 457 return user;
440 } 458 }
441 459