cpw.malu.xmpp.jingle_ft: 832bbd63: Reject file transfer offers with unsuppo...
malu at pidgin.im
malu at pidgin.im
Mon Jun 21 17:55:47 EDT 2010
-----------------------------------------------------------------
Revision: 832bbd6394fd5efc900618bb4ba638987633e296
Ancestor: 83fd1df46d24e73ea9732db36e1e10693160bc99
Author: malu at pidgin.im
Date: 2010-06-21T21:50:21
Branch: im.pidgin.cpw.malu.xmpp.jingle_ft
URL: http://d.pidgin.im/viewmtn/revision/info/832bbd6394fd5efc900618bb4ba638987633e296
Modified files:
libpurple/protocols/jabber/jingle/file-transfer.c
ChangeLog:
Reject file transfer offers with unsupported transports
-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/jingle/file-transfer.c 5624537ab3de04e0953a64f640c7fd99b10c6b40
+++ libpurple/protocols/jabber/jingle/file-transfer.c cc7804360d1a073543165bbbf64398290f816491
@@ -753,6 +753,16 @@ jingle_file_transfer_handle_action_inter
xmlnode *offer = xmlnode_get_child(description, "offer");
gchar *who = jingle_session_get_remote_jid(session);
+ /* check for supported transports */
+ if (!(JINGLE_IS_S5B(transport) || JINGLE_IS_IBB(transport))) {
+ /* send a session-reject */
+ jabber_iq_send(jingle_session_terminate_packet(session,
+ "unsupported-transports"));
+ g_object_unref(transport);
+ g_object_unref(session);
+ return;
+ }
+
/* maybe some time we'll add support for "request" mode
(for IM images, file sharing etc.) */
if (offer) {
More information about the Commits
mailing list