From bb52962f0d6f7c8dcf36db69231e7a0f640a4a8e Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Mon, 5 Dec 2022 15:40:07 +0100 Subject: [PATCH] delay candidates until after session-init/accept --- .../siacs/conversations/xmpp/jingle/JingleRtpConnection.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleRtpConnection.java b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleRtpConnection.java index 6e14fc56e..2581088ca 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleRtpConnection.java +++ b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleRtpConnection.java @@ -1262,7 +1262,6 @@ public class JingleRtpConnection extends AbstractJingleConnection final RtpContentMap respondingRtpContentMap = RtpContentMap.of(sessionDescription, false); this.responderRtpContentMap = respondingRtpContentMap; storePeerDtlsSetup(respondingRtpContentMap.getDtlsSetup().flip()); - webRTCWrapper.setIsReadyToReceiveIceCandidates(true); final ListenableFuture outgoingContentMapFuture = prepareOutgoingContentMap(respondingRtpContentMap); Futures.addCallback( @@ -1271,6 +1270,7 @@ public class JingleRtpConnection extends AbstractJingleConnection @Override public void onSuccess(final RtpContentMap outgoingContentMap) { sendSessionAccept(outgoingContentMap); + webRTCWrapper.setIsReadyToReceiveIceCandidates(true); } @Override @@ -1713,8 +1713,6 @@ public class JingleRtpConnection extends AbstractJingleConnection SessionDescription.parse(webRTCSessionDescription.description); final RtpContentMap rtpContentMap = RtpContentMap.of(sessionDescription, true); this.initiatorRtpContentMap = rtpContentMap; - //TODO delay ready to receive ice until after session-init - this.webRTCWrapper.setIsReadyToReceiveIceCandidates(true); final ListenableFuture outgoingContentMapFuture = encryptSessionInitiate(rtpContentMap); Futures.addCallback( @@ -1723,6 +1721,7 @@ public class JingleRtpConnection extends AbstractJingleConnection @Override public void onSuccess(final RtpContentMap outgoingContentMap) { sendSessionInitiate(outgoingContentMap, targetState); + webRTCWrapper.setIsReadyToReceiveIceCandidates(true); } @Override