From 2c5f610c5ad51d625779ce7ea3ba265d99a96817 Mon Sep 17 00:00:00 2001
From: Kateryna Kostiuk <kateryna.kostiuk@savoirfairelinux.com>
Date: Tue, 22 Sep 2020 16:03:37 -0400
Subject: [PATCH] call: clean waiting calls on hangup.

Remove call from waiting list on hangup. Most calls
will be removed from waiting list on callFailure, but if call
destroyed too early this method would not be called. This patch
handles that case.

Change-Id: Ia2fe977f7e3211268d4a9d7f972445571a6f491c
---
 src/manager.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/manager.cpp b/src/manager.cpp
index 0f90d65c3d..e1edd87eee 100644
--- a/src/manager.cpp
+++ b/src/manager.cpp
@@ -1030,6 +1030,7 @@ Manager::hangupCall(const std::string& callId)
     const auto& currentCallId(getCurrentCallId());
 
     stopTone();
+    pimpl_->removeWaitingCall(callId);
 
     /* We often get here when the call was hungup before being created */
     auto call = getCallFromCallID(callId);
-- 
GitLab