Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
libnice
libnice
Commits
80c10c5c
Commit
80c10c5c
authored
Apr 27, 2012
by
Guillaume Desmottes
🐐
Committed by
Youness Alaoui
Oct 04, 2012
Browse files
agent: display NiceComponentState as strings in debug message
https://bugs.freedesktop.org/show_bug.cgi?id=49219
parent
2ac9bb6d
Changes
1
Hide whitespace changes
Inline
Side-by-side
agent/agent.c
View file @
80c10c5c
...
...
@@ -1300,6 +1300,30 @@ void agent_signal_new_remote_candidate (NiceAgent *agent, NiceCandidate *candida
candidate
->
foundation
);
}
static
const
gchar
*
component_state_to_string
(
NiceComponentState
state
)
{
switch
(
state
)
{
case
NICE_COMPONENT_STATE_DISCONNECTED
:
return
"disconnected"
;
case
NICE_COMPONENT_STATE_GATHERING
:
return
"gathering"
;
case
NICE_COMPONENT_STATE_CONNECTING
:
return
"connecting"
;
case
NICE_COMPONENT_STATE_CONNECTED
:
return
"connected"
;
case
NICE_COMPONENT_STATE_READY
:
return
"ready"
;
case
NICE_COMPONENT_STATE_FAILED
:
return
"failed"
;
case
NICE_COMPONENT_STATE_LAST
:
break
;
}
return
"invalid"
;
}
void
agent_signal_component_state_change
(
NiceAgent
*
agent
,
guint
stream_id
,
guint
component_id
,
NiceComponentState
state
)
{
Component
*
component
;
...
...
@@ -1318,8 +1342,9 @@ void agent_signal_component_state_change (NiceAgent *agent, guint stream_id, gui
}
if
(
component
->
state
!=
state
&&
state
<
NICE_COMPONENT_STATE_LAST
)
{
nice_debug
(
"Agent %p : stream %u component %u STATE-CHANGE %u -> %u."
,
agent
,
stream_id
,
component_id
,
component
->
state
,
state
);
nice_debug
(
"Agent %p : stream %u component %u STATE-CHANGE %s -> %s."
,
agent
,
stream_id
,
component_id
,
component_state_to_string
(
component
->
state
),
component_state_to_string
(
state
));
component
->
state
=
state
;
...
...
Write
Preview
Supports
Markdown
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