Commit 8d20ca91 authored by Youness Alaoui's avatar Youness Alaoui

Adding some more debug

parent f2a0eca1
......@@ -601,7 +601,15 @@ void agent_gathering_done (NiceAgent *agent)
for (k = component->local_candidates; k; k = k->next) {
NiceCandidate *local_candidate = k->data;
{
gchar tmpbuf[INET6_ADDRSTRLEN];
nice_address_to_string (&local_candidate->addr, tmpbuf);
nice_debug ("Agent %p: gathered local candidate : [%s]:%u"
" for s%d/c%d. U/P '%s'/'%s'", agent,
tmpbuf, nice_address_get_port (&local_candidate->addr),
local_candidate->stream_id, local_candidate->component_id,
local_candidate->username, local_candidate->password);
}
for (l = component->remote_candidates; l; l = l->next) {
NiceCandidate *remote_candidate = l->data;
......@@ -991,6 +999,8 @@ nice_agent_gather_candidates (
/* note: no async discoveries pending, signal that we are ready */
if (agent->discovery_unsched_items == 0) {
nice_debug ("Agent %p: Candidate gathering FINISHED, no scheduled items.",
agent);
agent_gathering_done (agent);
} else {
g_assert (agent->discovery_list);
......@@ -1131,8 +1141,10 @@ static gboolean priv_add_remote_candidate (
{
gchar tmpbuf[INET6_ADDRSTRLEN];
nice_address_to_string (addr, tmpbuf);
nice_debug ("Agent %p : Adding remote candidate with addr [%s]:%u.", agent, tmpbuf,
nice_address_get_port (addr));
nice_debug ("Agent %p : Adding remote candidate with addr [%s]:%u"
" for s%d/c%d. U/P '%s'/'%s'", agent, tmpbuf,
nice_address_get_port (addr), stream_id, component_id,
username, password);
}
if (base_addr)
......
......@@ -2340,10 +2340,19 @@ gboolean conn_check_handle_inbound_stun (NiceAgent *agent, Stream *stream,
inbound = FALSE;
}
}
uname_len = priv_create_username (agent, stream,
component->id, rcand, lcand,
uname, sizeof (uname), inbound);
stun_debug ("Comparing username '");
stun_debug_bytes (username, username? username_len : 0);
stun_debug ("' (%d) with '", username_len);
stun_debug_bytes (uname, uname_len);
stun_debug ("' (%d) : %d\n",
uname_len, username && uname_len == username_len &&
memcmp (username, uname, uname_len) == 0);
if (username &&
uname_len == username_len &&
memcmp (uname, username, username_len) == 0) {
......
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