From 9fbf73d1ea7d587b4c4dcad73e25fc428eeae521 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sun, 26 Apr 2020 10:38:19 +0200 Subject: [PATCH] do not log failed calls that never rang --- .../conversations/xmpp/jingle/JingleRtpConnection.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 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 0052228b1..0dcac3326 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleRtpConnection.java +++ b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleRtpConnection.java @@ -657,9 +657,12 @@ public class JingleRtpConnection extends AbstractJingleConnection implements Web } private void sendSessionTerminate(final Reason reason, final String text) { + final State previous = this.state; final State target = reasonToState(reason); transitionOrThrow(target); - writeLogMessage(target); + if (previous != State.NULL) { + writeLogMessage(target); + } final JinglePacket jinglePacket = new JinglePacket(JinglePacket.Action.SESSION_TERMINATE, id.sessionId); jinglePacket.setReason(reason, text); Log.d(Config.LOGTAG, jinglePacket.toString()); @@ -672,7 +675,7 @@ public class JingleRtpConnection extends AbstractJingleConnection implements Web try { final RtpContentMap rtpContentMap = isInitiator() ? this.initiatorRtpContentMap : this.responderRtpContentMap; 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); return; }