summaryrefslogtreecommitdiff
path: root/agent/discovery.c
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.com>2014-02-24 18:50:59 -0500
committerOlivier CrĂȘte <olivier.crete@collabora.com>2014-02-24 18:56:42 -0500
commitca0f5c6d8d1b69c1c334b0826a56796905e6c9d8 (patch)
treeddd2939ccd57d232283326028e895766674b7fdc /agent/discovery.c
parent0fc36cb22805d8a08e7b5b27fa6174ae694239e6 (diff)
downloadlibnice-ca0f5c6d8d1b69c1c334b0826a56796905e6c9d8.tar.gz
agent: Delay signal emission after the lock has been released
This way, there can be no annoying re-entrancy in our code.
Diffstat (limited to 'agent/discovery.c')
-rw-r--r--agent/discovery.c4
1 files changed, 2 insertions, 2 deletions
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);