diff options
author | Alex Clayton <alex.clayton@isode.com> | 2016-03-16 15:45:11 (GMT) |
---|---|---|
committer | Alex Clayton <alex.clayton@isode.com> | 2016-03-16 15:57:40 (GMT) |
commit | f693c8e0fa9c6a051cdf6260f131db3d9355b49f (patch) | |
tree | 10ca50f0c3494566e005f9c202f7d3b6c6d036f9 /src/com/isode/stroke/filetransfer/IncomingFileTransferManager.java | |
parent | 8b9891afc85d114ff1e9c9a0291a4aaee8baeb09 (diff) | |
download | stroke-f693c8e0fa9c6a051cdf6260f131db3d9355b49f.zip stroke-f693c8e0fa9c6a051cdf6260f131db3d9355b49f.tar.bz2 |
Support early IBB use in Jingle File Transfer
As per swiften patch of the same name
(75703db2de5bbfb6622286600362016edb42dfb0).
Previously Jingle File Transfer in Stroke only used IBB transport as
fallback mechanism. With this patch Stroke will use IBB transport
candidates directly in the first session-initate/session-accept
message if the other party only supports IBB.
Test-information: Unit tests all pass.
Change-Id: Ice73a6028f10c63490bdb775a0a407fad48f587a
Diffstat (limited to 'src/com/isode/stroke/filetransfer/IncomingFileTransferManager.java')
-rw-r--r-- | src/com/isode/stroke/filetransfer/IncomingFileTransferManager.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/com/isode/stroke/filetransfer/IncomingFileTransferManager.java b/src/com/isode/stroke/filetransfer/IncomingFileTransferManager.java index 7166d67..06ed3ab 100644 --- a/src/com/isode/stroke/filetransfer/IncomingFileTransferManager.java +++ b/src/com/isode/stroke/filetransfer/IncomingFileTransferManager.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2015 Isode Limited. + * Copyright (c) 2010-2016 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ @@ -15,6 +15,7 @@ import com.isode.stroke.signals.Signal1; import com.isode.stroke.jingle.IncomingJingleSessionHandler; import com.isode.stroke.jingle.JingleSessionManager; import com.isode.stroke.jingle.JingleSession; +import com.isode.stroke.elements.JingleIBBTransportPayload; import com.isode.stroke.elements.JinglePayload; import com.isode.stroke.elements.JingleContentPayload; import com.isode.stroke.elements.JingleFileTransferDescription; @@ -24,6 +25,7 @@ import com.isode.stroke.network.TimerFactory; import com.isode.stroke.crypto.CryptoProvider; import com.isode.stroke.queries.IQRouter; import com.isode.stroke.jid.JID; + import java.util.logging.Logger; import java.util.Vector; @@ -55,7 +57,8 @@ public class IncomingFileTransferManager implements IncomingJingleSessionHandler final JID recipient) { if (Jingle.getContentWithDescription(contents, new JingleFileTransferDescription()) != null) { JingleContentPayload content = Jingle.getContentWithDescription(contents, new JingleFileTransferDescription()); - if (content.getTransport(new JingleS5BTransportPayload()) != null) { + if ( (content.getTransport(new JingleS5BTransportPayload()) != null) + || (content.getTransport(new JingleIBBTransportPayload()) != null) ) { JingleFileTransferDescription description = content.getDescription(new JingleFileTransferDescription()); if (description != null) { IncomingJingleFileTransfer transfer = new IncomingJingleFileTransfer( |