fix transports/descriptions not upgraded to jingle ft

fixes #4429
This commit is contained in:
Daniel Gultsch 2022-12-20 19:28:41 +01:00
parent 995cda9ddf
commit 36efd51a7f

View file

@ -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);
}