Commit 3b243a1e authored by Emmanuel Milou's avatar Emmanuel Milou
Browse files

[#2554] Fix "hangup" action close audio if there's still an active call

Conflicts:

	sflphone-common/src/managerimpl.cpp
parent 68104630
......@@ -413,7 +413,6 @@ ManagerImpl::hangupCall (const CallID& call_id)
PulseLayer *pulselayer;
AccountID account_id;
bool returnValue;
AudioLayer *audiolayer;
// store the current call id
CallID current_call_id = getCurrentCallId();
......@@ -425,17 +424,6 @@ ManagerImpl::hangupCall (const CallID& call_id)
if (_dbus) _dbus->getCallManager()->callStateChanged (call_id, "HUNGUP");
int nbCalls = getCallList().size();
audiolayer = getAudioDriver();
// stop streams
if (audiolayer && (nbCalls <= 1)) {
_debug (" hangupCall: stop audio stream, ther is only %i call(s) remaining\n", nbCalls);
audiolayer->stopStream();
}
if (participToConference (call_id)) {
Conference *conf = getConferenceFromCallID (call_id);
......@@ -472,6 +460,16 @@ ManagerImpl::hangupCall (const CallID& call_id)
removeCallAccount (call_id);
}
int nbCalls = getCallList().size();
AudioLayer *audiolayer = getAudioDriver();
// stop streams
if (audiolayer && (nbCalls <= 1)) {
_debug (" hangupCall: stop audio stream, ther is only %i call(s) remaining", nbCalls);
audiolayer->stopStream();
}
if (_audiodriver->getLayerType() == PULSEAUDIO) {
pulselayer = dynamic_cast<PulseLayer *> (getAudioDriver());
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment