From 1525d0833c96ca53e1ffb06fa3328b4663912566 Mon Sep 17 00:00:00 2001 From: Moxie Marlinspike Date: Tue, 9 May 2017 12:13:42 -0700 Subject: [PATCH] Enforce ordered data channel // FREEBIE --- .../securesms/webrtc/PeerConnectionWrapper.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/org/thoughtcrime/securesms/webrtc/PeerConnectionWrapper.java b/src/org/thoughtcrime/securesms/webrtc/PeerConnectionWrapper.java index 4b96a1096f..cd75882063 100644 --- a/src/org/thoughtcrime/securesms/webrtc/PeerConnectionWrapper.java +++ b/src/org/thoughtcrime/securesms/webrtc/PeerConnectionWrapper.java @@ -25,8 +25,6 @@ import org.webrtc.VideoCapturer; import org.webrtc.VideoRenderer; import org.webrtc.VideoSource; import org.webrtc.VideoTrack; -import org.webrtc.voiceengine.WebRtcAudioManager; -import org.webrtc.voiceengine.WebRtcAudioUtils; import java.util.LinkedList; import java.util.List; @@ -114,7 +112,10 @@ public class PeerConnectionWrapper { } public DataChannel createDataChannel(String name) { - return this.peerConnection.createDataChannel(name, new DataChannel.Init()); + DataChannel.Init dataChannelConfiguration = new DataChannel.Init(); + dataChannelConfiguration.ordered = true; + + return this.peerConnection.createDataChannel(name, dataChannelConfiguration); } public SessionDescription createOffer(MediaConstraints mediaConstraints) throws PeerConnectionException {