summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.com>2014-04-24 02:03:29 (GMT)
committerOlivier CrĂȘte <olivier.crete@collabora.com>2014-04-25 00:55:56 (GMT)
commitb572ecc505f5c1add4623871fe01143bca0ba3cb (patch)
tree0d4dd912d54a3cf597000652cd46aa254c451fa0
parent5bbed7e436df89c04d05657b510a60867c222e06 (diff)
downloadlibnice-b572ecc505f5c1add4623871fe01143bca0ba3cb.tar.gz
libnice-b572ecc505f5c1add4623871fe01143bca0ba3cb.tar.xz
conncheck: Don't fail a stream that has on-going discovery
-rw-r--r--agent/conncheck.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/agent/conncheck.c b/agent/conncheck.c
index 9d325fd..241151f 100644
--- a/agent/conncheck.c
+++ b/agent/conncheck.c
@@ -1162,6 +1162,18 @@ static void priv_update_check_list_failed_components (NiceAgent *agent, Stream *
* must be fetched before entering the loop*/
guint c, components = stream->n_components;
+ for (i = agent->discovery_list; i; i = i->next) {
+ CandidateDiscovery *d = i->data;
+
+ /* There is still discovery ogoing for this stream,
+ * so don't fail any of it's candidates.
+ */
+ if (d->stream == stream && !d->done)
+ return;
+ }
+ if (agent->discovery_list != NULL)
+ return;
+
/* note: iterate the conncheck list for each component separately */
for (c = 0; c < components; c++) {
Component *comp = NULL;
@@ -1170,7 +1182,7 @@ static void priv_update_check_list_failed_components (NiceAgent *agent, Stream *
for (i = stream->conncheck_list; i; i = i->next) {
CandidateCheckPair *p = i->data;
-
+
if (p->stream_id == stream->id &&
p->component_id == (c + 1)) {
if (p->state != NICE_CHECK_FAILED)