pidgin: afe30519: Fix another small leak. And update forma...
sadrul at pidgin.im
sadrul at pidgin.im
Wed Jun 24 04:45:58 EDT 2009
-----------------------------------------------------------------
Revision: afe30519d14b8a5dd49486c745784ca9294d095e
Ancestor: 81f48fa4b2591e944c2c23724006c27485d07ca6
Author: sadrul at pidgin.im
Date: 2009-06-24T08:10:30
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/afe30519d14b8a5dd49486c745784ca9294d095e
Modified files:
libpurple/protocols/yahoo/yahoo.c
ChangeLog:
Fix another small leak. And update formatting of some code for readability.
-------------- next part --------------
============================================================
--- libpurple/protocols/yahoo/yahoo.c ce8711a2c689ed8580964a51ad66ca548ef6faf0
+++ libpurple/protocols/yahoo/yahoo.c 4fc684e42c8aed006f8f3ee126f9474ac14c46e7
@@ -332,6 +332,7 @@ static void yahoo_process_status(PurpleC
break;
case 241: /* protocol buddy belongs to */
if(strtol(pair->value, NULL, 10) == 2) {
+ g_free(msn_name);
msn_name = g_strconcat("msn/", name, NULL);
name = msn_name;
}
@@ -350,6 +351,7 @@ static void yahoo_process_status(PurpleC
if (name && f) /* update the last buddy */
yahoo_update_status(gc, name, f);
+ g_free(msn_name);
}
static void yahoo_do_group_check(PurpleAccount *account, GHashTable *ht, const char *name, const char *group)
@@ -500,24 +502,24 @@ static void yahoo_process_list_15(Purple
if (!(g = purple_find_group(yd->current_list15_grp))) {
g = purple_group_new(yd->current_list15_grp);
purple_blist_add_group(g, NULL);
+ }
+ b = purple_buddy_new(account, norm_bud, NULL);
+ purple_blist_add_buddy(b, NULL, g, NULL);
}
- b = purple_buddy_new(account, norm_bud, NULL);
- purple_blist_add_buddy(b, NULL, g, NULL);
- }
- yahoo_do_group_check(account, ht, norm_bud, yd->current_list15_grp);
- if(protocol != 0) {
- f->protocol = protocol;
- purple_debug_info("yahoo", "Setting protocol to %d\n", f->protocol);
- }
- if(stealth == 2)
- f->presence = YAHOO_PRESENCE_PERM_OFFLINE;
+ yahoo_do_group_check(account, ht, norm_bud, yd->current_list15_grp);
+ if(protocol != 0) {
+ f->protocol = protocol;
+ purple_debug_info("yahoo", "Setting protocol to %d\n", f->protocol);
+ }
+ if(stealth == 2)
+ f->presence = YAHOO_PRESENCE_PERM_OFFLINE;
- /* set p2p status not connected and no p2p packet sent */
- if(protocol == 0) {
- yahoo_friend_set_p2p_status(f, YAHOO_P2PSTATUS_NOT_CONNECTED);
- f->p2p_packet_sent = 0;
- } else
- yahoo_friend_set_p2p_status(f, YAHOO_P2PSTATUS_DO_NOT_CONNECT);
+ /* set p2p status not connected and no p2p packet sent */
+ if(protocol == 0) {
+ yahoo_friend_set_p2p_status(f, YAHOO_P2PSTATUS_NOT_CONNECTED);
+ f->p2p_packet_sent = 0;
+ } else
+ yahoo_friend_set_p2p_status(f, YAHOO_P2PSTATUS_DO_NOT_CONNECT);
} else {
/* This buddy is on the ignore list (and therefore in no group) */
purple_debug_info("yahoo", "%s adding %s to the deny list because of the ignore list / no group was found\n",account->username, norm_bud);
More information about the Commits
mailing list