Commit a26ab492 authored by Philip Withnall's avatar Philip Withnall

agent: Delay some assignments until the agent is locked

This makes helgrind slightly happier.
parent 77c1e1ed
...@@ -1769,11 +1769,14 @@ static gboolean ...@@ -1769,11 +1769,14 @@ static gboolean
notify_pseudo_tcp_socket_clock (gpointer user_data) notify_pseudo_tcp_socket_clock (gpointer user_data)
{ {
Component *component = user_data; Component *component = user_data;
Stream *stream = component->stream; Stream *stream;
NiceAgent *agent = component->agent; NiceAgent *agent;
agent_lock(); agent_lock();
stream = component->stream;
agent = component->agent;
if (g_source_is_destroyed (g_main_current_source ())) { if (g_source_is_destroyed (g_main_current_source ())) {
nice_debug ("Source was destroyed. " nice_debug ("Source was destroyed. "
"Avoided race condition in notify_pseudo_tcp_socket_clock"); "Avoided race condition in notify_pseudo_tcp_socket_clock");
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment