check if setting local description was succesful

This commit is contained in:
Daniel Gultsch 2020-04-29 15:32:27 +02:00
parent 52d416c6e6
commit 8a586527c4
2 changed files with 3 additions and 4 deletions

View file

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

View file

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