diff options
author | Fabrice Bellet <fabrice@bellet.info> | 2016-07-15 23:31:42 +0200 |
---|---|---|
committer | Olivier CrĂȘte <olivier.crete@collabora.com> | 2017-06-21 16:05:57 -0400 |
commit | 195db6b344fc4f9fadc39419dfeec2fc14b23fac (patch) | |
tree | 7d9d72db5d4be4e32872340e53d951a940a26185 /agent/agent.c | |
parent | 07366a5bca7e4818b8df29d9c7c220da8f752547 (diff) | |
download | libnice-195db6b344fc4f9fadc39419dfeec2fc14b23fac.tar.gz |
agent: add new pairs only for gathering streams
At the end of the local candidate gathering process, we only create new
pairs for streams that are in gathering state.
Other stream that may be in ready state for example, due to a
previously succeeded conncheck process, may have accumulated some
couples (local,remote) candidates that have not resulted in the creation
a new pair during this previous conncheck process, and we don't want
these new pairs to be added now, because it would generate unneeded
transition changes for a stream unconcerned by this gathering.
Differential Revision: https://phabricator.freedesktop.org/D1755
Diffstat (limited to 'agent/agent.c')
-rw-r--r-- | agent/agent.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/agent/agent.c b/agent/agent.c index 577a7e0..e3705ed 100644 --- a/agent/agent.c +++ b/agent/agent.c @@ -2032,6 +2032,17 @@ void agent_gathering_done (NiceAgent *agent) for (i = agent->streams; i; i = i->next) { NiceStream *stream = i->data; + + /* We ignore streams not in gathering state, typically already in + * ready state. Such streams may have couples (local,remote) + * candidates that have not resulted in the creation a new pair + * during a previous conncheck session, and we don't want these new + * pairs to be added now, because it would generate unneeded + * transition changes for a stream unconcerned by this gathering. + */ + if (!stream->gathering) + continue; + for (j = stream->components; j; j = j->next) { NiceComponent *component = j->data; |