pidgin: 69e70bd6: Don't call purple_xfer_error before purp...
malu at pidgin.im
malu at pidgin.im
Mon Nov 15 16:31:40 EST 2010
----------------------------------------------------------------------
Revision: 69e70bd6383836c5ebe78d1da542084bbac2439e
Parent: c9d34a717dbe3a1f18a1aa8db0ccb729c633b60f
Author: malu at pidgin.im
Date: 11/15/10 16:30:07
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/69e70bd6383836c5ebe78d1da542084bbac2439e
Changelog:
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
Changes against parent c9d34a717dbe3a1f18a1aa8db0ccb729c633b60f
patched libpurple/protocols/jabber/si.c
-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/si.c 9b715f685fd833596a3c0dc40964a1b91ad3c49c
+++ libpurple/protocols/jabber/si.c f5b31a44291578f676f621a8c54834e7abf6c30f
@@ -983,14 +983,8 @@ jabber_si_xfer_ibb_error_cb(JabberIBBSes
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(JabberIBBSe
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(JabberIBBSe
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);
}
}
More information about the Commits
mailing list