summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.com>2014-04-25 00:33:33 (GMT)
committerOlivier CrĂȘte <olivier.crete@collabora.com>2014-04-25 00:42:54 (GMT)
commitf559f388c694088433d13cdf0295bf00db866f09 (patch)
tree8ed4cfe664e3120befdddb39698e3fead42977a6
parentedcbc597322d167d72225d8d322fd5a73671e15f (diff)
downloadlibnice-f559f388c694088433d13cdf0295bf00db866f09.tar.gz
libnice-f559f388c694088433d13cdf0295bf00db866f09.tar.xz
conncheck: Only stop conncheck timer if no stream has pending conn checks
-rw-r--r--agent/conncheck.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/agent/conncheck.c b/agent/conncheck.c
index d1cb4fa..1dc0b5b 100644
--- a/agent/conncheck.c
+++ b/agent/conncheck.c
@@ -1447,6 +1447,7 @@ void conn_check_prune_stream (NiceAgent *agent, Stream *stream)
{
CandidateCheckPair *pair;
GSList *i;
+ gboolean keep_going = FALSE;
for (i = stream->conncheck_list; i ; ) {
GSList *next = i->next;
@@ -1462,8 +1463,16 @@ void conn_check_prune_stream (NiceAgent *agent, Stream *stream)
break;
}
- if (!stream->conncheck_list)
- conn_check_free (agent);
+ for (i = agent->streams; i; i = i->next) {
+ Stream *s = i->data;
+ if (s->conncheck_list) {
+ keep_going = TRUE;
+ break;
+ }
+ }
+
+ if (!keep_going)
+ conn_check_stop (agent);
}
/*