cpw.malu.xmpp.jingle_ft: 12c14e48: Fix a couple of crashers when cancelling...
malu at pidgin.im
malu at pidgin.im
Sun Mar 29 06:01:19 EDT 2009
-----------------------------------------------------------------
Revision: 12c14e4835c36f346e8ff814bedc7e5b5862a89a
Ancestor: 8c4d7a427e9f815e0a40eea66bca838759c88a0f
Author: malu at pidgin.im
Date: 2009-03-29T09:58:48
Branch: im.pidgin.cpw.malu.xmpp.jingle_ft
URL: http://d.pidgin.im/viewmtn/revision/info/12c14e4835c36f346e8ff814bedc7e5b5862a89a
Modified files:
libpurple/protocols/jabber/jingle/file-transfer.c
ChangeLog:
Fix a couple of crashers when cancelling a file transfer
-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/jingle/file-transfer.c f83336c3f0c28ce06bf183c19d5baa6e94fa6515
+++ libpurple/protocols/jabber/jingle/file-transfer.c 9ba95a8304ca12c8f8e249f48fa1bc6624d3d7bd
@@ -543,7 +543,9 @@ jingle_file_transfer_to_xml_internal(Jin
xmlnode *offer = xmlnode_new_child(description, "offer");
const PurpleXfer *xfer = jingle_file_transfer_get_xfer(ft);
- xmlnode_insert_child(offer, jabber_xfer_create_file_element(xfer));
+ /* if xfer is NULL, it means it has disconnected */
+ if (xfer)
+ xmlnode_insert_child(offer, jabber_xfer_create_file_element(xfer));
}
return node;
}
@@ -647,7 +649,8 @@ jingle_file_transfer_handle_action_inter
if (xfer) {
purple_debug_info("jingle",
"got session-terminate, ending transfer\n");
- purple_xfer_end(xfer);
+ if (!purple_xfer_is_canceled(xfer))
+ purple_xfer_end(xfer);
JINGLE_FT_GET_PRIVATE(JINGLE_FT(content))->xfer = NULL;
}
More information about the Commits
mailing list