Mercurial > pidgin.yaz
changeset 31287:e358e16e527f
Add a ref to the part at sbconn and add some debug output.
author | masca@cpw.pidgin.im |
---|---|
date | Wed, 07 Jul 2010 21:04:57 +0000 |
parents | 544221aadf6e |
children | 7edcf92b1537 |
files | libpurple/protocols/msn/sbconn.c libpurple/protocols/msn/slpmsg_part.c |
diffstat | 2 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/msn/sbconn.c Wed Jul 07 21:03:15 2010 +0000 +++ b/libpurple/protocols/msn/sbconn.c Wed Jul 07 21:04:57 2010 +0000 @@ -17,7 +17,7 @@ msn_message_set_header(msg, "P2P-Dest", passport); data = msn_slpmsgpart_serialize(part, &size); - msg->part = part; + msg->part = msn_slpmsgpart_ref(part); msn_message_set_bin_data(msg, data, size);
--- a/libpurple/protocols/msn/slpmsg_part.c Wed Jul 07 21:03:15 2010 +0000 +++ b/libpurple/protocols/msn/slpmsg_part.c Wed Jul 07 21:04:57 2010 +0000 @@ -1,4 +1,5 @@ #include "internal.h" +#include "debug.h" #include "slpmsg.h" #include "slpmsg_part.h" @@ -79,6 +80,9 @@ g_return_val_if_fail(part != NULL, NULL); part->ref_count ++; + if (purple_debug_is_verbose()) + purple_debug_info("msn", "part ref (%p)[%" G_GSIZE_FORMAT "]\n", part, part->ref_count); + return part; } @@ -89,6 +93,9 @@ part->ref_count--; + if (purple_debug_is_verbose()) + purple_debug_info("msn", "part unref (%p)[%" G_GSIZE_FORMAT "]\n", part, part->ref_count); + if (part->ref_count == 0) { msn_slpmsgpart_destroy(part);