Commit 267c2b90 authored by Olivier Crête's avatar Olivier Crête 👻

conncheck: Remove useless checks from priv_store_pending_check

parent 793c301b
......@@ -1864,23 +1864,17 @@ static int priv_store_pending_check (NiceAgent *agent, Component *component,
}
icheck = g_slice_new0 (IncomingCheck);
if (icheck) {
GSList *pending = g_slist_append (component->incoming_checks, icheck);
if (pending) {
component->incoming_checks = pending;
icheck->from = *from;
icheck->local_socket = socket;
icheck->priority = priority;
icheck->use_candidate = use_candidate;
icheck->username_len = username_len;
icheck->username = NULL;
if (username_len > 0)
icheck->username = g_memdup (username, username_len);
return 0;
}
}
component->incoming_checks = g_slist_append (component->incoming_checks, icheck);
icheck->from = *from;
icheck->local_socket = socket;
icheck->priority = priority;
icheck->use_candidate = use_candidate;
icheck->username_len = username_len;
icheck->username = NULL;
if (username_len > 0)
icheck->username = g_memdup (username, username_len);
return -1;
return 0;
}
/*
......
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