From 8a586527c4c4ea7366740bfc8b31928ac83bc23a Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Wed, 29 Apr 2020 15:32:27 +0200 Subject: [PATCH] check if setting local description was succesful --- .../siacs/conversations/xmpp/jingle/JingleRtpConnection.java | 4 ++-- .../eu/siacs/conversations/xmpp/jingle/WebRTCWrapper.java | 3 +-- 2 files changed, 3 insertions(+), 4 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 275d0e427..4359f39c3 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleRtpConnection.java +++ b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleRtpConnection.java @@ -430,7 +430,7 @@ public class JingleRtpConnection extends AbstractJingleConnection implements Web final SessionDescription sessionDescription = SessionDescription.parse(webRTCSessionDescription.description); final RtpContentMap respondingRtpContentMap = RtpContentMap.of(sessionDescription); sendSessionAccept(respondingRtpContentMap); - this.webRTCWrapper.setLocalDescription(webRTCSessionDescription); + this.webRTCWrapper.setLocalDescription(webRTCSessionDescription).get(); } catch (final Exception e) { Log.d(Config.LOGTAG, "unable to send session accept", Throwables.getRootCause(e)); webRTCWrapper.close(); @@ -647,7 +647,7 @@ public class JingleRtpConnection extends AbstractJingleConnection implements Web sendSessionInitiate(rtpContentMap, targetState); this.webRTCWrapper.setLocalDescription(webRTCSessionDescription).get(); } catch (final Exception e) { - Log.d(Config.LOGTAG, id.account.getJid().asBareJid() + ": unable to sendSessionInitiate", e); + Log.d(Config.LOGTAG, id.account.getJid().asBareJid() + ": unable to sendSessionInitiate", Throwables.getRootCause(e)); webRTCWrapper.close(); if (isInState(targetState)) { sendSessionTerminate(Reason.FAILED_APPLICATION); diff --git a/src/main/java/eu/siacs/conversations/xmpp/jingle/WebRTCWrapper.java b/src/main/java/eu/siacs/conversations/xmpp/jingle/WebRTCWrapper.java index bb5c1ea24..17c1b77fe 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/jingle/WebRTCWrapper.java +++ b/src/main/java/eu/siacs/conversations/xmpp/jingle/WebRTCWrapper.java @@ -352,8 +352,7 @@ public class WebRTCWrapper { } @Override - public void onSetFailure(String s) { - Log.d(Config.LOGTAG, "unable to set local " + s); + public void onSetFailure(final String s) { future.setException(new IllegalArgumentException("unable to set local session description: " + s)); }