From ca0f5c6d8d1b69c1c334b0826a56796905e6c9d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Cr=C3=AAte?= Date: Mon, 24 Feb 2014 18:50:59 -0500 Subject: agent: Delay signal emission after the lock has been released This way, there can be no annoying re-entrancy in our code. --- agent/discovery.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'agent/discovery.c') diff --git a/agent/discovery.c b/agent/discovery.c index d4c2ab2..049aa56 100644 --- a/agent/discovery.c +++ b/agent/discovery.c @@ -1029,7 +1029,7 @@ static gboolean priv_discovery_tick (gpointer pointer) agent->discovery_timer_source = NULL; } } - agent_unlock(); + agent_unlock_and_emit (agent); return ret; } @@ -1045,7 +1045,7 @@ void discovery_schedule (NiceAgent *agent) g_assert (agent->discovery_list != NULL); if (agent->discovery_unsched_items > 0) { - + if (agent->discovery_timer_source == NULL) { /* step: run first iteration immediately */ gboolean res = priv_discovery_tick_unlocked (agent); -- cgit v1.2.1