comparison libpurple/protocols/mxit/roster.c @ 31936:2b387aaeb89d

Don't access PurpleBuddy->proto_data directly, rather use the accessor functions.
author andrew.victor@mxit.com
date Tue, 23 Aug 2011 20:48:43 +0000
parents 4b15c5c68aa4
children e9ea77904829
comparison
equal deleted inserted replaced
31935:4b15c5c68aa4 31936:2b387aaeb89d
310 * again. This is really not ideal and very irritating, but how else then? 310 * again. This is really not ideal and very irritating, but how else then?
311 */ 311 */
312 312
313 /* create new buddy */ 313 /* create new buddy */
314 newbuddy = purple_buddy_new( session->acc, buddy->name, buddy->alias ); 314 newbuddy = purple_buddy_new( session->acc, buddy->name, buddy->alias );
315 newbuddy->proto_data = buddy->proto_data; 315 purple_buddy_set_protocol_data( newbuddy, purple_buddy_get_protocol_data( buddy ) );
316 buddy->proto_data = NULL; 316 purple_buddy_set_protocol_data( buddy, NULL );
317 317
318 /* remove the buddy */ 318 /* remove the buddy */
319 purple_blist_remove_buddy( buddy ); 319 purple_blist_remove_buddy( buddy );
320 320
321 /* add buddy */ 321 /* add buddy */
394 buddy = NULL; 394 buddy = NULL;
395 } 395 }
396 396
397 /* create new buddy */ 397 /* create new buddy */
398 buddy = purple_buddy_new( session->acc, contact->username, contact->alias ); 398 buddy = purple_buddy_new( session->acc, contact->username, contact->alias );
399 purple_buddy_set_protocol_data(buddy, contact); 399 purple_buddy_set_protocol_data( buddy, contact );
400 400
401 /* add new buddy to list */ 401 /* add new buddy to list */
402 purple_blist_add_buddy( buddy, NULL, group, NULL ); 402 purple_blist_add_buddy( buddy, NULL, group, NULL );
403 } 403 }
404 else { 404 else {