Commit 15c0546f authored by Fabrice Bellet's avatar Fabrice Bellet
Browse files

conncheck: improve the selection of the pairs to be checked

This patch aims to implement more closely the algorithm described
in RFC 5245 indicating how pairs are transitionned from state Frozen
to Waiting. This is described in when a check succeeded, and
correspond to modifications in function priv_conn_check_unfreeze_related().
This is also described in 5.7.4 when defining the initial state of the
pairs in a conncheck, and correspond to modifications in function

This patch introduces the notion of active and frozen check list. It
allows us to define the timer restranmission delay as described in 16.1.

Another modification in priv_conn_check_tick_unlocked() is that every
stream in handled consecutively, and in an independant way. The pacing
was previously of a single STUN request emitted per callback, it is now
of a triggered check per callback OR a single STUN per callback AND per
stream per callback.

The description of ordinary checks per stream in 5.8 is detailled in
function priv_conn_check_tick_stream(), and a remaining of the code
used to nominate a pair by the controlling agent is put in a dedicated
function priv_conn_check_tick_stream_nominate()

Differential Revision:
parent 58d061df
This diff is collapsed.
......@@ -103,27 +103,6 @@ nice_stream_find_component_by_id (NiceStream *stream, guint id)
return NULL;
* Returns true if all components of the stream are either
* 'CONNECTED' or 'READY' (connected plus nominated).
nice_stream_all_components_ready (NiceStream *stream)
GSList *i;
for (i = stream->components; i; i = i->next) {
NiceComponent *component = i->data;
if (component &&
!(component->state == NICE_COMPONENT_STATE_CONNECTED ||
component->state == NICE_COMPONENT_STATE_READY))
return FALSE;
return TRUE;
* Initialized the local crendentials for the stream.
......@@ -103,9 +103,6 @@ nice_stream_new (guint n_components, NiceAgent *agent);
nice_stream_close (NiceStream *stream);
nice_stream_all_components_ready (NiceStream *stream);
NiceComponent *
nice_stream_find_component_by_id (NiceStream *stream, guint id);
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