From 60c143f62e143e8335e2d76aeb85f97409d70bb4 Mon Sep 17 00:00:00 2001 From: Tristan Matthews <tristan.matthews@savoirfairelinux.com> Date: Thu, 23 May 2013 15:58:09 -0400 Subject: [PATCH] * #24789: daemon: return true if hangupCall succeeded --- daemon/src/managerimpl.cpp | 6 ++++-- daemon/src/managerimpl.h | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/daemon/src/managerimpl.cpp b/daemon/src/managerimpl.cpp index 9928812b35..a96ab6b284 100644 --- a/daemon/src/managerimpl.cpp +++ b/daemon/src/managerimpl.cpp @@ -390,7 +390,7 @@ bool ManagerImpl::answerCall(const std::string& call_id) } //THREAD=Main -void ManagerImpl::hangupCall(const std::string& callId) +bool ManagerImpl::hangupCall(const std::string& callId) { // store the current call id std::string currentCallId(getCurrentCallId()); @@ -408,7 +408,7 @@ void ManagerImpl::hangupCall(const std::string& callId) /* We often get here when the call was hungup before being created */ if (not isValidCall(callId) and not isIPToIP(callId)) { DEBUG("Could not hang up call %s, call not valid", callId.c_str()); - return; + return false; } // Disconnect streams @@ -433,6 +433,7 @@ void ManagerImpl::hangupCall(const std::string& callId) } } catch (const VoipLinkException &e) { ERROR("%s", e.what()); + return false; } } else { std::string accountId(getAccountFromCall(callId)); @@ -447,6 +448,7 @@ void ManagerImpl::hangupCall(const std::string& callId) } getMainBuffer().dumpInfo(); + return true; } bool ManagerImpl::hangupConference(const std::string& id) diff --git a/daemon/src/managerimpl.h b/daemon/src/managerimpl.h index 3c8e527d96..6eaf021b2c 100644 --- a/daemon/src/managerimpl.h +++ b/daemon/src/managerimpl.h @@ -178,7 +178,7 @@ class ManagerImpl { * Hangup the call * @param id The call identifier */ - void hangupCall(const std::string& id); + bool hangupCall(const std::string& id); /** -- GitLab