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
6977d0e6
Commit
6977d0e6
authored
Oct 01, 2018
by
Ghislain MARY
Browse files
Improve chat logs, mainly by tracing the chat room states.
parent
3131fc4d
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/chat/chat-room/chat-room.cpp
View file @
6977d0e6
...
...
@@ -234,6 +234,7 @@ void ChatRoomPrivate::notifyIsComposingReceived (const Address &remoteAddress, b
void
ChatRoomPrivate
::
notifyStateChanged
()
{
L_Q
();
LinphoneChatRoom
*
cr
=
getCChatRoom
();
lInfo
()
<<
"Chat room ["
<<
q
->
getChatRoomId
()
<<
"] state changed to: "
<<
Utils
::
toString
(
state
);
linphone_core_notify_chat_room_state_changed
(
q
->
getCore
()
->
getCCore
(),
cr
,
(
LinphoneChatRoomState
)
state
);
_linphone_chat_room_notify_state_changed
(
cr
,
(
LinphoneChatRoomState
)
state
);
}
...
...
src/chat/chat-room/client-group-chat-room.cpp
View file @
6977d0e6
...
...
@@ -587,7 +587,8 @@ 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!"
;
lWarning
()
<<
"First notify received in ClientGroupChatRoom that is not in the Created state ["
<<
Utils
::
toString
(
getState
())
<<
"], ignoring it!"
;
return
;
}
...
...
src/conference/handlers/local-conference-event-handler.cpp
View file @
6977d0e6
...
...
@@ -406,7 +406,7 @@ void LocalConferenceEventHandler::subscribeReceived (LinphoneEvent *lev, bool on
shared_ptr
<
Participant
>
participant
=
d
->
conf
->
findParticipant
(
Address
(
addrStr
));
bctbx_free
(
addrStr
);
if
(
!
participant
)
{
lError
()
<<
"
r
eceived SUBSCRIBE corresponds to no participant of the conference
;
"
<<
d
->
conf
->
getConferenceAddress
()
.
asString
()
<<
", no NOTIFY sent
.
"
;
lError
()
<<
"
R
eceived SUBSCRIBE corresponds to no participant of the conference
[
"
<<
d
->
conf
->
getConferenceAddress
()
<<
"
]
, no NOTIFY sent"
;
linphone_event_deny_subscription
(
lev
,
LinphoneReasonDeclined
);
return
;
}
...
...
@@ -417,8 +417,8 @@ void LocalConferenceEventHandler::subscribeReceived (LinphoneEvent *lev, bool on
bctbx_free
(
contactAddrStr
);
shared_ptr
<
ParticipantDevice
>
device
=
participant
->
getPrivate
()
->
findDevice
(
contactAddr
);
if
(
!
device
||
(
device
->
getState
()
!=
ParticipantDevice
::
State
::
Present
&&
device
->
getState
()
!=
ParticipantDevice
::
State
::
Joining
))
{
lError
()
<<
"
r
eceived SUBSCRIBE for conference
:
"
<<
d
->
conf
->
getConferenceAddress
()
.
asString
()
<<
"device sending subscribe
:
"
<<
contactAddr
.
asString
()
<<
" is not known, no NOTIFY sent
.
"
;
lError
()
<<
"
R
eceived SUBSCRIBE for conference
[
"
<<
d
->
conf
->
getConferenceAddress
()
<<
"
],
device sending subscribe
[
"
<<
contactAddr
<<
"
]
is not known, no NOTIFY sent"
;
linphone_event_deny_subscription
(
lev
,
LinphoneReasonDeclined
);
return
;
}
...
...
@@ -428,17 +428,16 @@ void LocalConferenceEventHandler::subscribeReceived (LinphoneEvent *lev, bool on
unsigned
int
lastNotify
=
static_cast
<
unsigned
int
>
(
Utils
::
stoi
(
linphone_event_get_custom_header
(
lev
,
"Last-Notify-Version"
)));
device
->
setConferenceSubscribeEvent
(
lev
);
if
(
lastNotify
==
0
||
(
device
->
getState
()
==
ParticipantDevice
::
State
::
Joining
))
{
lInfo
()
<<
"Sending initial notify of conference
:
"
<<
d
->
conf
->
getConferenceAddress
()
.
asString
()
<<
" to: "
<<
device
->
getAddress
()
.
asString
()
;
lInfo
()
<<
"Sending initial notify of conference
[
"
<<
d
->
conf
->
getConferenceAddress
()
<<
"
]
to: "
<<
device
->
getAddress
();
d
->
notifyFullState
(
d
->
createNotifyFullState
(
static_cast
<
int
>
(
d
->
lastNotify
),
oneToOne
),
device
);
}
else
if
(
lastNotify
<
d
->
lastNotify
)
{
lInfo
()
<<
"Sending all missed notify ["
<<
lastNotify
<<
"-"
<<
d
->
lastNotify
<<
"] for conference:"
<<
d
->
conf
->
getConferenceAddress
().
asString
()
<<
" to: "
<<
participant
->
getAddress
().
asString
();
"] for conference ["
<<
d
->
conf
->
getConferenceAddress
()
<<
"] to: "
<<
participant
->
getAddress
();
d
->
notifyParticipantDevice
(
d
->
createNotifyMultipart
(
static_cast
<
int
>
(
lastNotify
)),
device
,
true
);
}
else
if
(
lastNotify
>
d
->
lastNotify
)
{
lError
()
<<
"
l
ast notify received by client
:
["
<<
lastNotify
<<
"] for conference
:
"
<<
d
->
conf
->
getConferenceAddress
()
.
asString
()
<<
" should not be higher than last notify sent by server
:
["
<<
d
->
lastNotify
<<
"]"
;
lError
()
<<
"
L
ast notify received by client ["
<<
lastNotify
<<
"] for conference
[
"
<<
d
->
conf
->
getConferenceAddress
()
<<
"
]
should not be higher than last notify sent by server ["
<<
d
->
lastNotify
<<
"]"
;
}
}
else
if
(
linphone_event_get_subscription_state
(
lev
)
==
LinphoneSubscriptionTerminated
)
device
->
setConferenceSubscribeEvent
(
nullptr
);
...
...
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