mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-31 10:19:23 +00:00
When a call session of a ClientGroupChatRoom is released, destroy the chat room only if the state is TerminationPending and there was no error during the termination.
This commit is contained in:
parent
2154c78ff3
commit
d8e81d63c8
1 changed files with 11 additions and 2 deletions
|
|
@ -143,8 +143,17 @@ void ClientGroupChatRoomPrivate::onCallSessionStateChanged (
|
|||
qConference->getPrivate()->eventHandler->subscribe(q->getChatRoomId());
|
||||
} else if (q->getState() == ChatRoom::State::TerminationPending)
|
||||
qConference->getPrivate()->focus->getPrivate()->getSession()->terminate();
|
||||
} else if ((newState == CallSession::State::Released) && (q->getState() == ChatRoom::State::TerminationPending)) {
|
||||
q->onConferenceTerminated(q->getConferenceAddress());
|
||||
} else if (newState == CallSession::State::Released) {
|
||||
if (q->getState() == ChatRoom::State::TerminationPending) {
|
||||
if (session->getReason() == LinphoneReasonNone) {
|
||||
// Everything is fine, the chat room has been left on the server side
|
||||
q->onConferenceTerminated(q->getConferenceAddress());
|
||||
} else {
|
||||
// Go to state TerminationFailed and then back to Created since it has not been terminated
|
||||
setState(ChatRoom::State::TerminationFailed);
|
||||
setState(ChatRoom::State::Created);
|
||||
}
|
||||
}
|
||||
} else if (newState == CallSession::State::Error) {
|
||||
if (q->getState() == ChatRoom::State::CreationPending)
|
||||
setState(ChatRoom::State::CreationFailed);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue