Mercurial > pidgin.yaz
changeset 31363:372bec4b2ff9
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
author | Marcus Lundblad <ml@update.uu.se> |
---|---|
date | Mon, 15 Nov 2010 21:30:07 +0000 |
parents | 16d75ac3dbf5 |
children | f8fd915ee476 |
files | libpurple/protocols/jabber/si.c |
diffstat | 1 files changed, 0 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- 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); } }