projects
/
platform
/
upstream
/
libnice.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1deee69
)
agent: Delay signal emission after the lock has been released
author
Olivier Crête
<olivier.crete@collabora.com>
Mon, 24 Feb 2014 23:50:59 +0000
(18:50 -0500)
committer
Olivier Crête
<olivier.crete@collabora.com>
Tue, 25 Feb 2014 05:51:29 +0000
(
00:51
-0500)
This way, there can be no annoying re-entrancy in our code.
agent/agent.c
patch
|
blob
|
history
diff --git
a/agent/agent.c
b/agent/agent.c
index
4395f3b
..
689a2f6
100644
(file)
--- a/
agent/agent.c
+++ b/
agent/agent.c
@@
-3724,8
+3724,9
@@
component_io_cb (GSocket *socket, GIOCondition condition, gpointer user_data)
if (g_source_is_destroyed (g_main_current_source ())) {
/* Silently return FALSE. */
nice_debug ("%s: source %p destroyed", G_STRFUNC, g_main_current_source ());
- remove_source = TRUE;
- goto done;
+
+ agent_unlock ();
+ return G_SOURCE_REMOVE;
}
component = socket_source->component;
@@
-3875,10
+3876,11
@@
component_io_cb (GSocket *socket, GIOCondition condition, gpointer user_data)
}
done:
- g_object_unref (agent);
agent_unlock_and_emit (agent);
+ g_object_unref (agent);
+
return !remove_source;
}