aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java')
-rw-r--r--src/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java b/src/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java
index b5b92554..0a805afd 100644
--- a/src/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java
+++ b/src/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java
@@ -124,4 +124,31 @@ public class JingleConnectionManager {
return 524288;
}
}
+
+ public void deliverIbbPacket(Account account, IqPacket packet) {
+ String sid = null;
+ Element payload = null;
+ if (packet.hasChild("open","http://jabber.org/protocol/ibb")) {
+ payload = packet.findChild("open","http://jabber.org/protocol/ibb");
+ sid = payload.getAttribute("sid");
+ } else if (packet.hasChild("data","http://jabber.org/protocol/ibb")) {
+ payload = packet.findChild("data","http://jabber.org/protocol/ibb");
+ sid = payload.getAttribute("sid");
+ }
+ if (sid!=null) {
+ for (JingleConnection connection : connections) {
+ if (connection.hasTransportId(sid)) {
+ JingleTransport transport = connection.getTransport();
+ if (transport instanceof JingleInbandTransport) {
+ JingleInbandTransport inbandTransport = (JingleInbandTransport) transport;
+ inbandTransport.deliverPayload(packet,payload);
+ return;
+ }
+ }
+ }
+ Log.d("xmppService","couldnt deliver payload: "+payload.toString());
+ } else {
+ Log.d("xmppService","no sid found in incomming ibb packet");
+ }
+ }
}