Mercurial > pidgin.yaz
changeset 20948:128aca651b9a
merge of '4ac79800f2efc2dbe9a348189a545b149d6dfb44'
and '92060374e73337f24fcb27c372b2c970120b1252'
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Mon, 15 Oct 2007 04:42:44 +0000 |
parents | 3c4d37b98c31 (diff) 87742ec493b1 (current diff) |
children | dd0878ccc577 508a06e834dc |
files | pidgin/gtkconv.c |
diffstat | 5 files changed, 39 insertions(+), 29 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/buddyicon.c Mon Oct 15 04:29:22 2007 +0000 +++ b/libpurple/buddyicon.c Mon Oct 15 04:42:44 2007 +0000 @@ -505,37 +505,33 @@ purple_buddy_icon_set_data(icon, icon_data, icon_len, checksum); else if (icon_data && icon_len > 0) { - if (icon_data != NULL && icon_len > 0) - { - PurpleBuddyIcon *icon = purple_buddy_icon_new(account, username, icon_data, icon_len, checksum); + PurpleBuddyIcon *icon = purple_buddy_icon_new(account, username, icon_data, icon_len, checksum); - /* purple_buddy_icon_new() calls - * purple_buddy_icon_set_data(), which calls - * purple_buddy_icon_update(), which has the buddy list - * and conversations take references as appropriate. - * This function doesn't return icon, so we can't - * leave a reference dangling. */ - purple_buddy_icon_unref(icon); - } - else + /* purple_buddy_icon_new() calls + * purple_buddy_icon_set_data(), which calls + * purple_buddy_icon_update(), which has the buddy list + * and conversations take references as appropriate. + * This function doesn't return icon, so we can't + * leave a reference dangling. */ + purple_buddy_icon_unref(icon); + } + else + { + /* If the buddy list or a conversation was holding a + * reference, we'd have found the icon in the cache. + * Since we know we're deleting the icon, we only + * need a subset of purple_buddy_icon_update(). */ + + GSList *buddies = purple_find_buddies(account, username); + while (buddies != NULL) { - /* If the buddy list or a conversation was holding a - * reference, we'd have found the icon in the cache. - * Since we know we're deleting the icon, we only - * need a subset of purple_buddy_icon_update(). */ + PurpleBuddy *buddy = (PurpleBuddy *)buddies->data; - GSList *buddies = purple_find_buddies(account, username); - while (buddies != NULL) - { - PurpleBuddy *buddy = (PurpleBuddy *)buddies->data; + unref_filename(purple_blist_node_get_string((PurpleBlistNode *)buddy, "buddy_icon")); + purple_blist_node_remove_setting((PurpleBlistNode *)buddy, "buddy_icon"); + purple_blist_node_remove_setting((PurpleBlistNode *)buddy, "icon_checksum"); - unref_filename(purple_blist_node_get_string((PurpleBlistNode *)buddy, "buddy_icon")); - purple_blist_node_remove_setting((PurpleBlistNode *)buddy, "buddy_icon"); - purple_blist_node_remove_setting((PurpleBlistNode *)buddy, "icon_checksum"); - - buddies = g_slist_delete_link(buddies, buddies); - } - + buddies = g_slist_delete_link(buddies, buddies); } } }
--- a/libpurple/protocols/msn/httpconn.c Mon Oct 15 04:29:22 2007 +0000 +++ b/libpurple/protocols/msn/httpconn.c Mon Oct 15 04:42:44 2007 +0000 @@ -687,6 +687,17 @@ g_free(httpconn->host); + while (httpconn->queue != NULL) { + MsnHttpQueueData *queue_data; + + queue_data = (MsnHttpQueueData *) httpconn->queue->data; + + httpconn->queue = g_list_remove_link(httpconn->queue, httpconn->queue); + + g_free(queue_data->body); + g_free(queue_data); + } + purple_circ_buffer_destroy(httpconn->tx_buf); if (httpconn->tx_handler > 0) purple_input_remove(httpconn->tx_handler);
--- a/libpurple/protocols/msn/slplink.c Mon Oct 15 04:29:22 2007 +0000 +++ b/libpurple/protocols/msn/slplink.c Mon Oct 15 04:42:44 2007 +0000 @@ -120,6 +120,8 @@ while (slplink->slp_calls != NULL) msn_slp_call_destroy(slplink->slp_calls->data); + g_queue_free(slplink->slp_msg_queue); + session->slplinks = g_list_remove(session->slplinks, slplink);
--- a/libpurple/protocols/msn/switchboard.c Mon Oct 15 04:29:22 2007 +0000 +++ b/libpurple/protocols/msn/switchboard.c Mon Oct 15 04:42:44 2007 +0000 @@ -108,8 +108,8 @@ g_free(swboard->auth_key); g_free(swboard->session_id); - for (l = swboard->users; l != NULL; l = l->next) - g_free(l->data); + for (; swboard->users; swboard->users = g_list_remove_link(swboard->users, swboard->users)) + g_free(swboard->users->data); session = swboard->session; session->switches = g_list_remove(session->switches, swboard);