# HG changeset patch # User Marcus Lundblad # Date 1289856607 0 # Node ID 372bec4b2ff9fa26dfb1a5cbb65b6e0799c7ffa1 # Parent 16d75ac3dbf51861f60ed78dafde38c9078c4dbb Don't call purple_xfer_error before purple_xfer_cancel_remote when an error occurs in IBB, avoids double transfer messages on error. Closes #12757 diff -r 16d75ac3dbf5 -r 372bec4b2ff9 libpurple/protocols/jabber/si.c --- a/libpurple/protocols/jabber/si.c Mon Nov 15 16:56:33 2010 +0000 +++ b/libpurple/protocols/jabber/si.c Mon Nov 15 21:30:07 2010 +0000 @@ -983,14 +983,8 @@ jabber_si_xfer_ibb_error_cb(JabberIBBSession *sess) { PurpleXfer *xfer = (PurpleXfer *) jabber_ibb_session_get_user_data(sess); - JabberStream *js = jabber_ibb_session_get_js(sess); - PurpleConnection *gc = js->gc; - PurpleAccount *account = purple_connection_get_account(gc); purple_debug_error("jabber", "an error occurred during IBB file transfer\n"); - purple_xfer_error(purple_xfer_get_type(xfer), account, - jabber_ibb_session_get_who(sess), - _("An error occurred on the in-band bytestream transfer\n")); purple_xfer_cancel_remote(xfer); } @@ -998,14 +992,9 @@ jabber_si_xfer_ibb_closed_cb(JabberIBBSession *sess) { PurpleXfer *xfer = (PurpleXfer *) jabber_ibb_session_get_user_data(sess); - JabberStream *js = jabber_ibb_session_get_js(sess); - PurpleConnection *gc = js->gc; - PurpleAccount *account = purple_connection_get_account(gc); purple_debug_info("jabber", "the remote user closed the transfer\n"); if (purple_xfer_get_bytes_remaining(xfer) > 0) { - purple_xfer_error(purple_xfer_get_type(xfer), account, - jabber_ibb_session_get_who(sess), _("Transfer was closed.")); purple_xfer_cancel_remote(xfer); } else { purple_xfer_set_completed(xfer, TRUE); @@ -1137,18 +1126,12 @@ jabber_si_xfer_ibb_opened_cb(JabberIBBSession *sess) { PurpleXfer *xfer = (PurpleXfer *) jabber_ibb_session_get_user_data(sess); - JabberStream *js = jabber_ibb_session_get_js(sess); - PurpleConnection *gc = js->gc; - PurpleAccount *account = purple_connection_get_account(gc); if (jabber_ibb_session_get_state(sess) == JABBER_IBB_SESSION_OPENED) { purple_xfer_start(xfer, -1, NULL, 0); purple_xfer_prpl_ready(xfer); } else { /* error */ - purple_xfer_error(purple_xfer_get_type(xfer), account, - jabber_ibb_session_get_who(sess), - _("Failed to open in-band bytestream")); purple_xfer_end(xfer); } }