cpw.malu.xmpp.jingle_ft: c3a49061: Fixed a crash on exit with Jingle FTs wh...

malu at pidgin.im malu at pidgin.im
Tue Jun 22 16:31:42 EDT 2010


-----------------------------------------------------------------
Revision: c3a490612935a86e11f1c6d34e9c6838827f1d61
Ancestor: 832bbd6394fd5efc900618bb4ba638987633e296
Author: malu at pidgin.im
Date: 2010-06-22T20:26:25
Branch: im.pidgin.cpw.malu.xmpp.jingle_ft
URL: http://d.pidgin.im/viewmtn/revision/info/c3a490612935a86e11f1c6d34e9c6838827f1d61

Modified files:
        libpurple/protocols/jabber/data.c
        libpurple/protocols/jabber/jingle/file-transfer.c

ChangeLog: 

Fixed a crash on exit with Jingle FTs when destroying remaining thumbnails
Fix retreiving BoB data objects when "alt" is NULL (which it will be when
fetching thumbnails).
Removed an unused variable

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/data.c	4d3fd2bac7788955256e089f5d86e49cc6b43cc9
+++ libpurple/protocols/jabber/data.c	a8fef7400cc50b83873ddfb35bc796b377640b28
@@ -331,7 +331,6 @@ jabber_data_request(JabberStream *js, co
 
 	g_return_if_fail(cid != NULL);
 	g_return_if_fail(who != NULL);
-	g_return_if_fail(alt != NULL);
 
 	request = jabber_iq_new(js, JABBER_IQ_GET);
 	data_request = jabber_data_get_xml_request(cid);
============================================================
--- libpurple/protocols/jabber/jingle/file-transfer.c	cc7804360d1a073543165bbbf64398290f816491
+++ libpurple/protocols/jabber/jingle/file-transfer.c	28739a3e28b8a3e3004c8d4df4d47c0796288377
@@ -133,7 +133,7 @@ jingle_file_transfer_finalize (GObject *
 
 		if (thumbnail) {
 			purple_debug_info("jingle-ft", "disposing left-over thumbnail\n");
-			jabber_data_destroy(priv->thumbnail_cid);
+			jabber_data_destroy(thumbnail);
 		}
 	}
 
@@ -243,7 +243,6 @@ jingle_file_transfer_ibb_data_recv_callb
 {
 	JingleFT *ft = JINGLE_FT(content);
 	PurpleXfer *xfer = JINGLE_FT_GET_PRIVATE(ft)->xfer;
-	JingleSession *session = jingle_content_get_session(content);
 	
 	if (purple_xfer_get_status(xfer) == PURPLE_XFER_STATUS_STARTED) { 
 		if (size <= purple_xfer_get_bytes_remaining(xfer)) {
@@ -597,7 +596,9 @@ jingle_file_transfer_cancel_send(PurpleX
 		}
 		g_object_unref(transport);
 		/* disassociate xfer from session */
-		JINGLE_FT(content)->priv->xfer = NULL;
+		if (content) {
+			JINGLE_FT(content)->priv->xfer = NULL;
+		}
 	}
 	g_object_unref(session);
 	g_object_unref(session);
@@ -755,6 +756,8 @@ jingle_file_transfer_handle_action_inter
 
 			/* check for supported transports */
 			if (!(JINGLE_IS_S5B(transport) || JINGLE_IS_IBB(transport))) {
+				purple_debug_info("jingle-ft",
+					"got a session-initiate with unsupported transported\n");
 				/* send a session-reject */
 				jabber_iq_send(jingle_session_terminate_packet(session,
 					"unsupported-transports"));


More information about the Commits mailing list