diff options
author | Philip Withnall <philip.withnall@collabora.co.uk> | 2014-09-26 12:56:52 +0100 |
---|---|---|
committer | Philip Withnall <philip.withnall@collabora.co.uk> | 2014-09-26 12:56:52 +0100 |
commit | a26ab492b00a34d7dc9349fb294faf39bf5b4672 (patch) | |
tree | 0ecd23bdbf4f60ef70c3f8500c29bfa52c3bdfac | |
parent | 77c1e1ed9dfc6628d37ae4f28da6327890f65139 (diff) | |
download | libnice-a26ab492b00a34d7dc9349fb294faf39bf5b4672.tar.gz |
agent: Delay some assignments until the agent is locked
This makes helgrind slightly happier.
-rw-r--r-- | agent/agent.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/agent/agent.c b/agent/agent.c index 2fd74b8..86421d8 100644 --- a/agent/agent.c +++ b/agent/agent.c @@ -1769,11 +1769,14 @@ static gboolean notify_pseudo_tcp_socket_clock (gpointer user_data) { Component *component = user_data; - Stream *stream = component->stream; - NiceAgent *agent = component->agent; + Stream *stream; + NiceAgent *agent; agent_lock(); + stream = component->stream; + agent = component->agent; + if (g_source_is_destroyed (g_main_current_source ())) { nice_debug ("Source was destroyed. " "Avoided race condition in notify_pseudo_tcp_socket_clock"); |