diff libpurple/protocols/bonjour/buddy.c @ 25788:ac967ea95b05

Use purple_buddy_get_protocol_data() and purple_buddy_set_protocol_data() in the Bonjour prpl. It's still not fully updated to compile.
author Richard Laager <rlaager@wiktel.com>
date Thu, 30 Oct 2008 20:08:29 +0000
parents fe7504f465a2
children da46097b4722
line wrap: on
line diff
--- a/libpurple/protocols/bonjour/buddy.c	Thu Oct 30 20:07:46 2008 +0000
+++ b/libpurple/protocols/bonjour/buddy.c	Thu Oct 30 20:08:29 2008 +0000
@@ -157,7 +157,7 @@
 		purple_blist_add_buddy(buddy, NULL, group, NULL);
 	}
 
-	buddy->proto_data = bonjour_buddy;
+	purple_buddy_set_protocol_data(buddy, bonjour_buddy);
 	name = purple_buddy_get_name(buddy);
 
 	/* Create the alias for the buddy using the first and the last name */
@@ -210,8 +210,8 @@
 	if (PURPLE_BLIST_NODE_SHOULD_SAVE(pb)) {
 		purple_prpl_got_user_status(purple_buddy_get_account(pb),
 					    purple_buddy_get_name(pb), "offline", NULL);
-		bonjour_buddy_delete(pb->proto_data);
-		pb->proto_data = NULL;
+		bonjour_buddy_delete(purple_buddy_get_protocol_data(pb));
+		purple_buddy_set_protocol_data(pb, NULL);
 	} else {
 		purple_account_remove_buddy(purple_buddy_get_account(pb), pb, NULL);
 		purple_blist_remove_buddy(pb);