diff options
author | Olivier Crête <olivier.crete@collabora.com> | 2014-02-24 18:50:59 -0500 |
---|---|---|
committer | Olivier Crête <olivier.crete@collabora.com> | 2014-02-24 18:56:42 -0500 |
commit | ca0f5c6d8d1b69c1c334b0826a56796905e6c9d8 (patch) | |
tree | ddd2939ccd57d232283326028e895766674b7fdc /agent/component.c | |
parent | 0fc36cb22805d8a08e7b5b27fa6174ae694239e6 (diff) | |
download | libnice-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/component.c')
-rw-r--r-- | agent/component.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/agent/component.c b/agent/component.c index 29c134d..1ddd586 100644 --- a/agent/component.c +++ b/agent/component.c @@ -752,7 +752,7 @@ component_emit_io_callback (Component *component, * handler. */ if (g_main_context_is_owner (component->ctx)) { /* Thread owns the main context, so invoke the callback directly. */ - agent_unlock (); + agent_unlock_and_emit (agent); io_callback (agent, stream_id, component_id, buf_len, (gchar *) buf, io_user_data); agent_lock (); @@ -907,7 +907,7 @@ component_source_prepare (GSource *source, gint *timeout_) done: - agent_unlock (); + agent_unlock_and_emit (agent); /* We can’t be sure if the ComponentSource itself needs to be dispatched until * poll() is called on all the child sources. */ |