Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
b72d736d
Commit
b72d736d
authored
Oct 02, 2018
by
Ghislain MARY
Browse files
Fix rejoining a one-to-one chat room with a device that is in the Left state.
parent
ca25c5ad
Pipeline
#381
failed with stage
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/chat/chat-room/server-group-chat-room.cpp
View file @
b72d736d
...
...
@@ -526,10 +526,18 @@ void ServerGroupChatRoomPrivate::addParticipantDevice (const shared_ptr<Particip
L_Q_T
(
LocalConference
,
qConference
);
shared_ptr
<
ParticipantDevice
>
device
=
participant
->
getPrivate
()
->
findDevice
(
deviceAddress
);
if
(
device
)
{
if
(
device
->
getState
()
==
ParticipantDevice
::
State
::
Joining
)
inviteDevice
(
device
);
else
if
(
device
->
getState
()
==
ParticipantDevice
::
State
::
Leaving
)
byeDevice
(
device
);
lInfo
()
<<
q
<<
": Adding participant device that is currently in state ["
<<
device
->
getState
()
<<
"]"
;
switch
(
device
->
getState
())
{
case
ParticipantDevice
::
State
::
Joining
:
case
ParticipantDevice
::
State
::
Left
:
inviteDevice
(
device
);
break
;
case
ParticipantDevice
::
State
::
Leaving
:
byeDevice
(
device
);
break
;
default:
break
;
}
}
else
if
(
findFilteredParticipant
(
participant
->
getAddress
()))
{
// Add device only if participant is not currently being removed
device
=
participant
->
getPrivate
()
->
addDevice
(
deviceAddress
);
...
...
@@ -621,6 +629,7 @@ void ServerGroupChatRoomPrivate::inviteDevice (const shared_ptr<ParticipantDevic
shared_ptr
<
CallSession
>
session
=
device
->
getSession
();
if
(
session
&&
(
session
->
getDirection
()
==
LinphoneCallIncoming
))
return
;
// Do not try to invite the device that is currently creating the chat room
device
->
setState
(
ParticipantDevice
::
State
::
Joining
);
if
(
!
session
||
(
session
->
getState
()
==
CallSession
::
State
::
End
)
||
(
session
->
getState
()
==
CallSession
::
State
::
Error
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment