libpurple/protocols/myspace/user.c

branch
next.minor
changeset 24946
390536329dc5
parent 24398
4865c2ee6ea8
child 25119
d78a152554c4
child 25140
7c494d2bc5e4
--- a/libpurple/protocols/myspace/user.c	Fri Oct 31 09:24:43 2008 +0000
+++ b/libpurple/protocols/myspace/user.c	Fri Oct 31 10:14:23 2008 +0000
@@ -57,16 +57,14 @@
 		return NULL;
 	}
 
-	if (!buddy->proto_data) {
+	if (!(user = purple_buddy_get_protocol_data(buddy))) {
 		/* No MsimUser for this buddy; make one. */
 
 		/* TODO: where is this freed? */
 		user = g_new0(MsimUser, 1);
 		user->buddy = buddy;
-		buddy->proto_data = (gpointer)user;
-	} 
-
-	user = (MsimUser *)(buddy->proto_data);
+		purple_buddy_set_protocol_data(buddy, (gpointer)user);
+	}
 
 	return user;
 }

mercurial