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 SessionDescription sessionDescription = SessionDescription.parse(webRTCSessionDescription.description);
final RtpContentMap respondingRtpContentMap = RtpContentMap.of(sessionDescription); final RtpContentMap respondingRtpContentMap = RtpContentMap.of(sessionDescription);
sendSessionAccept(respondingRtpContentMap); sendSessionAccept(respondingRtpContentMap);
this.webRTCWrapper.setLocalDescription(webRTCSessionDescription); this.webRTCWrapper.setLocalDescription(webRTCSessionDescription).get();
} catch (final Exception e) { } catch (final Exception e) {
Log.d(Config.LOGTAG, "unable to send session accept", Throwables.getRootCause(e)); Log.d(Config.LOGTAG, "unable to send session accept", Throwables.getRootCause(e));
webRTCWrapper.close(); webRTCWrapper.close();
@ -647,7 +647,7 @@ public class JingleRtpConnection extends AbstractJingleConnection implements Web
sendSessionInitiate(rtpContentMap, targetState); sendSessionInitiate(rtpContentMap, targetState);
this.webRTCWrapper.setLocalDescription(webRTCSessionDescription).get(); this.webRTCWrapper.setLocalDescription(webRTCSessionDescription).get();
} catch (final Exception e) { } 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(); webRTCWrapper.close();
if (isInState(targetState)) { if (isInState(targetState)) {
sendSessionTerminate(Reason.FAILED_APPLICATION); sendSessionTerminate(Reason.FAILED_APPLICATION);

View file

@ -352,8 +352,7 @@ public class WebRTCWrapper {
} }
@Override @Override
public void onSetFailure(String s) { public void onSetFailure(final String s) {
Log.d(Config.LOGTAG, "unable to set local " + s);
future.setException(new IllegalArgumentException("unable to set local session description: " + s)); future.setException(new IllegalArgumentException("unable to set local session description: " + s));
} }