Skip to content
Snippets Groups Projects
Commit 60c143f6 authored by Tristan Matthews's avatar Tristan Matthews
Browse files

* #24789: daemon: return true if hangupCall succeeded

parent d13a09c2
No related branches found
No related tags found
No related merge requests found
...@@ -390,7 +390,7 @@ bool ManagerImpl::answerCall(const std::string& call_id) ...@@ -390,7 +390,7 @@ bool ManagerImpl::answerCall(const std::string& call_id)
} }
//THREAD=Main //THREAD=Main
void ManagerImpl::hangupCall(const std::string& callId) bool ManagerImpl::hangupCall(const std::string& callId)
{ {
// store the current call id // store the current call id
std::string currentCallId(getCurrentCallId()); std::string currentCallId(getCurrentCallId());
...@@ -408,7 +408,7 @@ void ManagerImpl::hangupCall(const std::string& callId) ...@@ -408,7 +408,7 @@ void ManagerImpl::hangupCall(const std::string& callId)
/* We often get here when the call was hungup before being created */ /* We often get here when the call was hungup before being created */
if (not isValidCall(callId) and not isIPToIP(callId)) { if (not isValidCall(callId) and not isIPToIP(callId)) {
DEBUG("Could not hang up call %s, call not valid", callId.c_str()); DEBUG("Could not hang up call %s, call not valid", callId.c_str());
return; return false;
} }
// Disconnect streams // Disconnect streams
...@@ -433,6 +433,7 @@ void ManagerImpl::hangupCall(const std::string& callId) ...@@ -433,6 +433,7 @@ void ManagerImpl::hangupCall(const std::string& callId)
} }
} catch (const VoipLinkException &e) { } catch (const VoipLinkException &e) {
ERROR("%s", e.what()); ERROR("%s", e.what());
return false;
} }
} else { } else {
std::string accountId(getAccountFromCall(callId)); std::string accountId(getAccountFromCall(callId));
...@@ -447,6 +448,7 @@ void ManagerImpl::hangupCall(const std::string& callId) ...@@ -447,6 +448,7 @@ void ManagerImpl::hangupCall(const std::string& callId)
} }
getMainBuffer().dumpInfo(); getMainBuffer().dumpInfo();
return true;
} }
bool ManagerImpl::hangupConference(const std::string& id) bool ManagerImpl::hangupConference(const std::string& id)
......
...@@ -178,7 +178,7 @@ class ManagerImpl { ...@@ -178,7 +178,7 @@ class ManagerImpl {
* Hangup the call * Hangup the call
* @param id The call identifier * @param id The call identifier
*/ */
void hangupCall(const std::string& id); bool hangupCall(const std::string& id);
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment