do not log failed calls that never rang

This commit is contained in:
Daniel Gultsch 2020-04-26 10:38:19 +02:00
parent 006d7447a3
commit 9fbf73d1ea
1 changed files with 5 additions and 2 deletions

View File

@ -657,9 +657,12 @@ public class JingleRtpConnection extends AbstractJingleConnection implements Web
} }
private void sendSessionTerminate(final Reason reason, final String text) { private void sendSessionTerminate(final Reason reason, final String text) {
final State previous = this.state;
final State target = reasonToState(reason); final State target = reasonToState(reason);
transitionOrThrow(target); transitionOrThrow(target);
writeLogMessage(target); if (previous != State.NULL) {
writeLogMessage(target);
}
final JinglePacket jinglePacket = new JinglePacket(JinglePacket.Action.SESSION_TERMINATE, id.sessionId); final JinglePacket jinglePacket = new JinglePacket(JinglePacket.Action.SESSION_TERMINATE, id.sessionId);
jinglePacket.setReason(reason, text); jinglePacket.setReason(reason, text);
Log.d(Config.LOGTAG, jinglePacket.toString()); Log.d(Config.LOGTAG, jinglePacket.toString());
@ -672,7 +675,7 @@ public class JingleRtpConnection extends AbstractJingleConnection implements Web
try { try {
final RtpContentMap rtpContentMap = isInitiator() ? this.initiatorRtpContentMap : this.responderRtpContentMap; final RtpContentMap rtpContentMap = isInitiator() ? this.initiatorRtpContentMap : this.responderRtpContentMap;
transportInfo = rtpContentMap.transportInfo(contentName, candidate); transportInfo = rtpContentMap.transportInfo(contentName, candidate);
} catch (Exception e) { } catch (final Exception e) {
Log.d(Config.LOGTAG, id.account.getJid().asBareJid() + ": unable to prepare transport-info from candidate for content=" + contentName); Log.d(Config.LOGTAG, id.account.getJid().asBareJid() + ": unable to prepare transport-info from candidate for content=" + contentName);
return; return;
} }