From 36efd51a7fd980b43431bb9ff93fc0578e60c83b Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Tue, 20 Dec 2022 19:28:41 +0100 Subject: [PATCH] fix transports/descriptions not upgraded to jingle ft fixes #4429 --- .../conversations/xmpp/jingle/stanzas/Content.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/xmpp/jingle/stanzas/Content.java b/src/main/java/eu/siacs/conversations/xmpp/jingle/stanzas/Content.java index 962515293..061cea752 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/jingle/stanzas/Content.java +++ b/src/main/java/eu/siacs/conversations/xmpp/jingle/stanzas/Content.java @@ -64,7 +64,9 @@ public class Content extends Element { return null; } final String namespace = description.getNamespace(); - if (Namespace.JINGLE_APPS_RTP.equals(namespace)) { + if (FileTransferDescription.NAMESPACES.contains(namespace)) { + return FileTransferDescription.upgrade(description); + } else if (Namespace.JINGLE_APPS_RTP.equals(namespace)) { return RtpDescription.upgrade(description); } else { return GenericDescription.upgrade(description); @@ -84,7 +86,11 @@ public class Content extends Element { public GenericTransportInfo getTransport() { final Element transport = this.findChild("transport"); final String namespace = transport == null ? null : transport.getNamespace(); - if (Namespace.JINGLE_TRANSPORT_ICE_UDP.equals(namespace)) { + if (Namespace.JINGLE_TRANSPORTS_IBB.equals(namespace)) { + return IbbTransportInfo.upgrade(transport); + } else if (Namespace.JINGLE_TRANSPORTS_S5B.equals(namespace)) { + return S5BTransportInfo.upgrade(transport); + } else if (Namespace.JINGLE_TRANSPORT_ICE_UDP.equals(namespace)) { return IceUdpTransportInfo.upgrade(transport); } else if (transport != null) { return GenericTransportInfo.upgrade(transport); @@ -93,6 +99,7 @@ public class Content extends Element { } } + public void setTransport(GenericTransportInfo transportInfo) { this.addChild(transportInfo); }