From f18ec53233b52240520bb88d186a8cbe9b6daedc Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Mon, 25 Mar 2024 10:58:20 +0100 Subject: [PATCH] minor safeguard to ensure call integration ends --- .../conversations/xmpp/jingle/JingleConnectionManager.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java index 9dc13e174..b70463eb0 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java +++ b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java @@ -498,8 +498,8 @@ public class JingleConnectionManager extends AbstractConnectionManager { final RtpSessionProposal proposal = getRtpSessionProposal(account, from.asBareJid(), sessionId); synchronized (rtpSessionProposals) { - // TODO remove the remove()!= null check to ensure we always call busy() - if (proposal != null && rtpSessionProposals.remove(proposal) != null) { + if (proposal != null) { + rtpSessionProposals.remove(proposal); proposal.callIntegration.busy(); writeLogMissedOutgoing( account, proposal.with, proposal.sessionId, serverMsgId, timestamp); @@ -758,7 +758,6 @@ public class JingleConnectionManager extends AbstractConnectionManager { final RtpSessionProposal proposal = RtpSessionProposal.of(account, with.asBareJid(), media, callIntegration); callIntegration.setCallback(new ProposalStateCallback(proposal)); - // TODO ensure that there is no previous proposal?! this.rtpSessionProposals.put(proposal, DeviceDiscoveryState.SEARCHING); mXmppConnectionService.notifyJingleRtpConnectionUpdate( account, proposal.with, proposal.sessionId, RtpEndUserState.FINDING_DEVICE);