Commit 4602f3b7 authored by Youness Alaoui's avatar Youness Alaoui Committed by Olivier Crête

Add candidate type to debug

parent 4b3fb8cc
......@@ -1492,6 +1492,21 @@ adjust_tcp_clock (NiceAgent *agent, Stream *stream, Component *component)
}
}
static const gchar *
_transport_to_string (NiceCandidateTransport type) {
switch(type) {
case NICE_CANDIDATE_TRANSPORT_UDP:
return "UDP";
case NICE_CANDIDATE_TRANSPORT_TCP_ACTIVE:
return "TCP-ACT";
case NICE_CANDIDATE_TRANSPORT_TCP_PASSIVE:
return "TCP-PASS";
case NICE_CANDIDATE_TRANSPORT_TCP_SO:
return "TCP-SO";
default:
return "???";
}
}
void agent_gathering_done (NiceAgent *agent)
{
......@@ -1508,8 +1523,9 @@ void agent_gathering_done (NiceAgent *agent)
if (nice_debug_is_enabled ()) {
gchar tmpbuf[INET6_ADDRSTRLEN];
nice_address_to_string (&local_candidate->addr, tmpbuf);
nice_debug ("Agent %p: gathered local candidate : [%s]:%u"
nice_debug ("Agent %p: gathered %s local candidate : [%s]:%u"
" for s%d/c%d. U/P '%s'/'%s'", agent,
_transport_to_string (local_candidate->transport),
tmpbuf, nice_address_get_port (&local_candidate->addr),
local_candidate->stream_id, local_candidate->component_id,
local_candidate->username, local_candidate->password);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment