summaryrefslogtreecommitdiff
path: root/agent/agent.c
diff options
context:
space:
mode:
Diffstat (limited to 'agent/agent.c')
-rw-r--r--agent/agent.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/agent/agent.c b/agent/agent.c
index b0b5cf3..8eedc0c 100644
--- a/agent/agent.c
+++ b/agent/agent.c
@@ -1856,6 +1856,16 @@ nice_agent_gather_candidates (
stream->gathering = TRUE;
+ /* Only signal the new candidates after we're sure that the gathering was
+ * succesfful. But before sending gathering-done */
+ for (n = 0; n < stream->n_components; n++) {
+ Component *component = stream_find_component_by_id (stream, n + 1);
+ for (i = component->local_candidates; i; i = i->next) {
+ NiceCandidate *candidate = i->data;
+ agent_signal_new_candidate (agent, candidate);
+ }
+ }
+
/* note: no async discoveries pending, signal that we are ready */
if (agent->discovery_unsched_items == 0) {
nice_debug ("Agent %p: Candidate gathering FINISHED, no scheduled items.",