cpw.malu.xmpp.jingle_ft: 06bc53f1: When using a proxied candidate offered b...
malu at pidgin.im
malu at pidgin.im
Tue Jan 19 16:31:01 EST 2010
-----------------------------------------------------------------
Revision: 06bc53f1491b09aeafe0fd9fa5e1afe0c7559264
Ancestor: f86aa5e546a66e360aa9c1a56009f3d0ad0ac962
Author: malu at pidgin.im
Date: 2010-01-19T21:28:29
Branch: im.pidgin.cpw.malu.xmpp.jingle_ft
URL: http://d.pidgin.im/viewmtn/revision/info/06bc53f1491b09aeafe0fd9fa5e1afe0c7559264
Modified files:
libpurple/ft.c
libpurple/protocols/jabber/jingle/file-transfer.c
libpurple/protocols/jabber/jingle/s5b.c
ChangeLog:
When using a proxied candidate offered by the receiver wait for the <activated/> transport-info
before started (we already wait for the response to this when offering a proxied candidate when
being the intiator).
This also seems to fix that nasty bug crashing when cancelling a transfer (probably messed up the
wather on the xfer somehow...).
-------------- next part --------------
============================================================
--- libpurple/ft.c 3c02e1899ac38b28c0806c13016019204690ca37
+++ libpurple/ft.c 0515dc16e644143f3decbca1b01e08cc42f1dda0
@@ -1411,11 +1411,10 @@ purple_xfer_cancel_local(PurpleXfer *xfe
}
if (xfer->watcher != 0) {
- purple_debug_info("filetransfer", "cancel_local: remove watcher\n");
purple_input_remove(xfer->watcher);
xfer->watcher = 0;
}
-
+
if (xfer->fd != -1)
close(xfer->fd);
============================================================
--- libpurple/protocols/jabber/jingle/file-transfer.c e45a8dc794b994b4c5aa5045b71f9ccab2754450
+++ libpurple/protocols/jabber/jingle/file-transfer.c 349956636c785a3f636fda1051cd6ac552cb6623
@@ -124,7 +124,7 @@ jingle_file_transfer_finalize (GObject *
/* remove reference in transfer */
priv->xfer->data = NULL;
}
-
+
G_OBJECT_CLASS(parent_class)->finalize(ft);
}
============================================================
--- libpurple/protocols/jabber/jingle/s5b.c a1f198a62657fc6bce9e0274065ce2dc09403acb
+++ libpurple/protocols/jabber/jingle/s5b.c b842050b166beffc58c40ed0b3f550d703e67f77
@@ -1589,12 +1589,16 @@ jingle_s5b_handle_transport_info(JingleS
s5b->priv->failed_cb(s5b->priv->failed_content);
} else if (s5b->priv->successful_remote_candidate) {
jingle_s5b_surrender(s5b);
- /* start the transfer */
- if (s5b->priv->connect_cb && s5b->priv->connect_content) {
- s5b->priv->connect_cb(s5b->priv->connect_content);
- } else {
- /* some error? */
+ if (s5b->priv->successful_remote_candidate->type !=
+ JINGLE_S5B_CANDIDATE_TYPE_PROXY) {
+ /* start the transfer */
+ if (s5b->priv->connect_cb && s5b->priv->connect_content) {
+ s5b->priv->connect_cb(s5b->priv->connect_content);
+ } else {
+ /* some error? */
+ }
}
+ /* if it's a proxy, we'll wait for <activated/> before starting */
}
} else if (activated) {
const gchar *cid = xmlnode_get_attrib(activated, "cid");
More information about the Commits
mailing list