comparison libpurple/protocols/bonjour/bonjour.c @ 24280:c06b85e1d020

Fix Bonjour to work with the hidden structs, except for proto_data.
author Richard Laager <rlaager@wiktel.com>
date Thu, 30 Oct 2008 05:41:19 +0000
parents 399975ad001c
children 5ace6c024230 efe41c4e0df0 ac967ea95b05 bcad7dc4b453
comparison
equal deleted inserted replaced
24279:7a1d01cc98d8 24280:c06b85e1d020
57 57
58 if (bonjour_group == NULL) 58 if (bonjour_group == NULL)
59 return; 59 return;
60 60
61 /* Go through and remove all buddies that belong to this account */ 61 /* Go through and remove all buddies that belong to this account */
62 for (cnode = ((PurpleBlistNode *) bonjour_group)->child; cnode; cnode = cnodenext) { 62 for (cnode = purple_blist_node_get_first_child((PurpleBlistNode *) bonjour_group); cnode; cnode = cnodenext) {
63 cnodenext = cnode->next; 63 cnodenext = purple_blist_node_get_sibling_next(cnode);
64 if (!PURPLE_BLIST_NODE_IS_CONTACT(cnode)) 64 if (!PURPLE_BLIST_NODE_IS_CONTACT(cnode))
65 continue; 65 continue;
66 for (bnode = cnode->child; bnode; bnode = bnodenext) { 66 for (bnode = purple_blist_node_get_first_child(cnode); bnode; bnode = bnodenext) {
67 bnodenext = bnode->next; 67 bnodenext = purple_blist_node_get_sibling_next(bnode);
68 if (!PURPLE_BLIST_NODE_IS_BUDDY(bnode)) 68 if (!PURPLE_BLIST_NODE_IS_BUDDY(bnode))
69 continue; 69 continue;
70 buddy = (PurpleBuddy *) bnode; 70 buddy = (PurpleBuddy *) bnode;
71 if (buddy->account != account) 71 if (purple_buddy_get_account(buddy) != account)
72 continue; 72 continue;
73 purple_prpl_got_user_status(account, buddy->name, "offline", NULL); 73 purple_prpl_got_user_status(account, purple_buddy_get_name(buddy), "offline", NULL);
74 purple_account_remove_buddy(account, buddy, NULL); 74 purple_account_remove_buddy(account, buddy, NULL);
75 purple_blist_remove_buddy(buddy); 75 purple_blist_remove_buddy(buddy);
76 } 76 }
77 } 77 }
78 78