Mercurial > pidgin
changeset 19676:a48681403103
Unregister the iq callback listener when the transfer is freed. Fixes #1804. It doesn't seem correct to me that nothing is sent to the recipient when the sender cancels the ft request, but that is a different issue.
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Fri, 07 Sep 2007 01:52:47 +0000 |
parents | 55c47f7ab2a2 |
children | e68694150fd8 |
files | libpurple/protocols/jabber/si.c |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/jabber/si.c Fri Sep 07 01:22:19 2007 +0000 +++ b/libpurple/protocols/jabber/si.c Fri Sep 07 01:52:47 2007 +0000 @@ -708,6 +708,10 @@ jabber_iq_set_callback(iq, jabber_si_xfer_send_method_cb, xfer); + /* Store the IQ id so that we can cancel the callback */ + g_free(jsx->iq_id); + jsx->iq_id = g_strdup(iq->id); + jabber_iq_send(iq); } @@ -722,6 +726,8 @@ purple_proxy_connect_cancel(jsx->connect_data); if (jsx->listen_data != NULL) purple_network_listen_cancel(jsx->listen_data); + if (jsx->iq_id != NULL) + jabber_iq_remove_callback_by_id(js, jsx->iq_id); g_free(jsx->stream_id); g_free(jsx->iq_id);