Commit e3d8fbf9 authored by Youness Alaoui's avatar Youness Alaoui

lock the mutex before accessing agent->discovery_unsched_items

parent f19e09a5
......@@ -1208,11 +1208,12 @@ nice_agent_set_remote_candidates (NiceAgent *agent, guint stream_id, guint compo
const GSList *i;
int added = 0;
g_static_rec_mutex_lock (&agent->mutex);
if (agent->discovery_unsched_items > 0)
if (agent->discovery_unsched_items > 0) {
g_static_rec_mutex_unlock (&agent->mutex);
return -1;
g_static_rec_mutex_lock (&agent->mutex);
}
for (i = candidates; i && added >= 0; i = i->next) {
NiceCandidate *d = (NiceCandidate*) i->data;
......
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