mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-22 05:38:14 +00:00
Fixed a crash with group chat rooms created when receiving a REFER, see comment for details and check it doesn't impact server
This commit is contained in:
parent
2a64f69f35
commit
8e05e6a21f
1 changed files with 5 additions and 2 deletions
|
|
@ -799,9 +799,12 @@ static void refer_received(SalOp *op, const SalAddress *refer_to){
|
|||
} else {
|
||||
LinphoneChatRoom *cr = _linphone_client_group_chat_room_new(lc, addr.asString().c_str(), nullptr);
|
||||
L_GET_CPP_PTR_FROM_C_OBJECT(cr)->join();
|
||||
L_GET_PRIVATE(lc->cppCore)->insertChatRoom(L_GET_CPP_PTR_FROM_C_OBJECT(cr));
|
||||
/* The following causes a crash because chat room hasn't yet a peer address.
|
||||
The above call to join() will create a CallSession which will call onConferenceCreated when it'll reach the Connected state.
|
||||
onConferenceCreated will then call the following commented lines, no need for them here. */
|
||||
/*L_GET_PRIVATE(lc->cppCore)->insertChatRoom(L_GET_CPP_PTR_FROM_C_OBJECT(cr));
|
||||
L_GET_PRIVATE_FROM_C_OBJECT(cr)->setState(LinphonePrivate::ChatRoom::State::Created);
|
||||
L_GET_PRIVATE(lc->cppCore)->insertChatRoomWithDb(L_GET_CPP_PTR_FROM_C_OBJECT(cr));
|
||||
L_GET_PRIVATE(lc->cppCore)->insertChatRoomWithDb(L_GET_CPP_PTR_FROM_C_OBJECT(cr));*/
|
||||
static_cast<SalReferOp *>(op)->reply(SalReasonNone);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue