Commit 58fdd9b5 authored by Fabrice Bellet's avatar Fabrice Bellet Committed by Olivier Crête

conncheck: invoke the debug dump in more places

Differential Revision: https://phabricator.freedesktop.org/D1123
parent d63e323b
...@@ -264,6 +264,8 @@ static gboolean priv_conn_check_unfreeze_next (NiceAgent *agent) ...@@ -264,6 +264,8 @@ static gboolean priv_conn_check_unfreeze_next (NiceAgent *agent)
* priority) * priority)
*/ */
priv_print_conn_check_lists (agent, G_STRFUNC, NULL);
for (i = agent->streams; i; i = i->next) { for (i = agent->streams; i; i = i->next) {
NiceStream *stream = i->data; NiceStream *stream = i->data;
guint64 max_frozen_priority = 0; guint64 max_frozen_priority = 0;
...@@ -318,6 +320,8 @@ static void priv_conn_check_unfreeze_related (NiceAgent *agent, NiceStream *stre ...@@ -318,6 +320,8 @@ static void priv_conn_check_unfreeze_related (NiceAgent *agent, NiceStream *stre
g_assert (stream); g_assert (stream);
g_assert (stream->id == ok_check->stream_id); g_assert (stream->id == ok_check->stream_id);
priv_print_conn_check_lists (agent, G_STRFUNC, NULL);
/* step: perform the step (1) of 'Updating Pair States' */ /* step: perform the step (1) of 'Updating Pair States' */
for (i = stream->conncheck_list; i ; i = i->next) { for (i = stream->conncheck_list; i ; i = i->next) {
CandidateCheckPair *p = i->data; CandidateCheckPair *p = i->data;
...@@ -401,8 +405,6 @@ static gboolean priv_conn_check_tick_stream (NiceStream *stream, NiceAgent *agen ...@@ -401,8 +405,6 @@ static gboolean priv_conn_check_tick_stream (NiceStream *stream, NiceAgent *agen
guint frozen = 0, waiting = 0; guint frozen = 0, waiting = 0;
GSList *i, *k; GSList *i, *k;
priv_print_conn_check_lists (agent, G_STRFUNC, NULL);
for (i = stream->conncheck_list; i ; i = i->next) { for (i = stream->conncheck_list; i ; i = i->next) {
CandidateCheckPair *p = i->data; CandidateCheckPair *p = i->data;
...@@ -424,6 +426,8 @@ static gboolean priv_conn_check_tick_stream (NiceStream *stream, NiceAgent *agen ...@@ -424,6 +426,8 @@ static gboolean priv_conn_check_tick_stream (NiceStream *stream, NiceAgent *agen
tmpbuf1, nice_address_get_port (&p->local->addr), tmpbuf1, nice_address_get_port (&p->local->addr),
tmpbuf2, nice_address_get_port (&p->remote->addr)); tmpbuf2, nice_address_get_port (&p->remote->addr));
candidate_check_pair_fail (stream, agent, p); candidate_check_pair_fail (stream, agent, p);
priv_print_conn_check_lists (agent, G_STRFUNC,
", retransmission failed");
break; break;
} }
...@@ -577,6 +581,8 @@ static gboolean priv_conn_check_tick_unlocked (NiceAgent *agent) ...@@ -577,6 +581,8 @@ static gboolean priv_conn_check_tick_unlocked (NiceAgent *agent)
pair = priv_get_pair_from_triggered_check_queue (agent); pair = priv_get_pair_from_triggered_check_queue (agent);
if (pair) { if (pair) {
priv_print_conn_check_lists (agent, G_STRFUNC,
", got a pair from triggered check list");
priv_conn_check_initiate (agent, pair); priv_conn_check_initiate (agent, pair);
return TRUE; return TRUE;
} }
...@@ -628,6 +634,9 @@ static gboolean priv_conn_check_tick_unlocked (NiceAgent *agent) ...@@ -628,6 +634,9 @@ static gboolean priv_conn_check_tick_unlocked (NiceAgent *agent)
} }
} }
priv_print_conn_check_lists (agent, G_STRFUNC,
", conncheck timer stopped");
/* Stopping the timer so destroy the source.. this will allow /* Stopping the timer so destroy the source.. this will allow
the timer to be reset if we get a set_remote_candidates after this the timer to be reset if we get a set_remote_candidates after this
point */ point */
...@@ -2690,6 +2699,8 @@ static gboolean priv_map_reply_to_conn_check_request (NiceAgent *agent, NiceStre ...@@ -2690,6 +2699,8 @@ static gboolean priv_map_reply_to_conn_check_request (NiceAgent *agent, NiceStre
Nominated Flag" (ID-19) */ Nominated Flag" (ID-19) */
if (ok_pair->nominated == TRUE) { if (ok_pair->nominated == TRUE) {
priv_update_selected_pair (agent, component, ok_pair); priv_update_selected_pair (agent, component, ok_pair);
priv_print_conn_check_lists (agent, G_STRFUNC,
", got a nominated pair");
/* Do not step down to CONNECTED if we're already at state READY*/ /* Do not step down to CONNECTED if we're already at state READY*/
if (component->state != NICE_COMPONENT_STATE_READY) { if (component->state != NICE_COMPONENT_STATE_READY) {
...@@ -2700,8 +2711,6 @@ static gboolean priv_map_reply_to_conn_check_request (NiceAgent *agent, NiceStre ...@@ -2700,8 +2711,6 @@ static gboolean priv_map_reply_to_conn_check_request (NiceAgent *agent, NiceStre
} }
} }
priv_print_conn_check_lists (agent, G_STRFUNC, NULL);
/* step: update pair states (ICE 7.1.2.2.3 "Updating pair /* step: update pair states (ICE 7.1.2.2.3 "Updating pair
states" and 8.1.2 "Updating States", ID-19) */ states" and 8.1.2 "Updating States", ID-19) */
priv_update_check_list_state_for_ready (agent, stream, component); priv_update_check_list_state_for_ready (agent, stream, component);
......
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