mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-03 20:46:28 +00:00
Terminate client group chat rooms only when the call session reaches the released state.
This commit is contained in:
parent
49cbc7ce24
commit
4170acf9e6
2 changed files with 9 additions and 1 deletions
|
|
@ -62,6 +62,7 @@ static void call_received(SalCallOp *h) {
|
|||
|
||||
if (linphone_core_get_global_state(lc) != LinphoneGlobalOn) {
|
||||
h->decline(SalReasonServiceUnavailable, nullptr);
|
||||
h->release();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -101,6 +102,7 @@ static void call_received(SalCallOp *h) {
|
|||
list<IdentityAddress> identAddresses = ServerGroupChatRoom::parseResourceLists(h->get_remote_body());
|
||||
if (identAddresses.size() != 1) {
|
||||
h->decline(SalReasonNotAcceptable, nullptr);
|
||||
h->release();
|
||||
return;
|
||||
}
|
||||
IdentityAddress confAddr = L_GET_PRIVATE_FROM_C_OBJECT(lc)->mainDb->findOneToOneConferenceChatRoomAddress(from, identAddresses.front());
|
||||
|
|
@ -126,6 +128,7 @@ static void call_received(SalCallOp *h) {
|
|||
} else {
|
||||
//invite is for an unknown chatroom
|
||||
h->decline(SalReasonNotFound, nullptr);
|
||||
h->release();
|
||||
}
|
||||
} else {
|
||||
shared_ptr<AbstractChatRoom> chatRoom = L_GET_CPP_PTR_FROM_C_OBJECT(lc)->findChatRoom(
|
||||
|
|
|
|||
|
|
@ -170,7 +170,7 @@ void ClientGroupChatRoomPrivate::onCallSessionStateChanged (
|
|||
} else if (q->getState() == ChatRoom::State::TerminationPending)
|
||||
qConference->getPrivate()->focus->getPrivate()->getSession()->terminate();
|
||||
} else if (newState == CallSession::State::End) {
|
||||
q->onConferenceTerminated(q->getConferenceAddress());
|
||||
setState(ChatRoom::State::TerminationPending);
|
||||
} else if (newState == CallSession::State::Released) {
|
||||
if (q->getState() == ChatRoom::State::TerminationPending) {
|
||||
if (session->getReason() == LinphoneReasonNone) {
|
||||
|
|
@ -548,6 +548,11 @@ void ClientGroupChatRoom::onConferenceTerminated (const IdentityAddress &addr) {
|
|||
void ClientGroupChatRoom::onFirstNotifyReceived (const IdentityAddress &addr) {
|
||||
L_D();
|
||||
|
||||
if (getState() != ChatRoom::State::Created) {
|
||||
lWarning() << "First notify received in ClientGroupChatRoom that is not in the Created state, ignoring it!";
|
||||
return;
|
||||
}
|
||||
|
||||
bool performMigration = false;
|
||||
shared_ptr<AbstractChatRoom> chatRoom;
|
||||
if (getParticipantCount() == 1) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue