summaryrefslogtreecommitdiff
path: root/agent/stream.c
diff options
context:
space:
mode:
authorFabrice Bellet <fabrice@bellet.info>2016-04-19 17:06:32 +0200
committerFabrice Bellet <fabrice@bellet.info>2017-06-12 17:55:45 +0200
commit15c0546f624113b8c0546a1f883a48bff7020f1b (patch)
tree2f4e85de0e1b3e710f625d48a8a3e2f75417cb67 /agent/stream.c
parent58d061df8f5425dc1add9c6030a2f891ebda4616 (diff)
downloadlibnice-15c0546f624113b8c0546a1f883a48bff7020f1b.tar.gz
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 7.1.3.2 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 priv_conn_check_unfreeze_next(). 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: https://phabricator.freedesktop.org/D813
Diffstat (limited to 'agent/stream.c')
-rw-r--r--agent/stream.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/agent/stream.c b/agent/stream.c
index 8121e12..533ff15 100644
--- a/agent/stream.c
+++ b/agent/stream.c
@@ -104,27 +104,6 @@ nice_stream_find_component_by_id (NiceStream *stream, guint id)
}
/*
- * Returns true if all components of the stream are either
- * 'CONNECTED' or 'READY' (connected plus nominated).
- */
-gboolean
-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.
*/
void