Commit 0db9a046 authored by Olivier Crête's avatar Olivier Crête

conncheck: Remove useless checks from priv_add_new_turn_refresh

parent c4766322
...@@ -2234,34 +2234,28 @@ priv_add_new_turn_refresh (CandidateDiscovery *cdisco, NiceCandidate *relay_cand ...@@ -2234,34 +2234,28 @@ priv_add_new_turn_refresh (CandidateDiscovery *cdisco, NiceCandidate *relay_cand
{ {
CandidateRefresh *cand; CandidateRefresh *cand;
NiceAgent *agent = cdisco->agent; NiceAgent *agent = cdisco->agent;
GSList *modified_list;
cand = g_slice_new0 (CandidateRefresh); cand = g_slice_new0 (CandidateRefresh);
if (cand) { agent->refresh_list = g_slist_append (agent->refresh_list, cand);
modified_list = g_slist_append (agent->refresh_list, cand);
cand->nicesock = cdisco->nicesock;
if (modified_list) { cand->relay_socket = relay_cand->sockptr;
cand->nicesock = cdisco->nicesock; cand->server = cdisco->server;
cand->relay_socket = relay_cand->sockptr; cand->turn = cdisco->turn;
cand->server = cdisco->server; cand->stream = cdisco->stream;
cand->turn = cdisco->turn; cand->component = cdisco->component;
cand->stream = cdisco->stream; cand->agent = cdisco->agent;
cand->component = cdisco->component; memcpy (&cand->stun_agent, &cdisco->stun_agent, sizeof(StunAgent));
cand->agent = cdisco->agent; nice_debug ("Agent %p : Adding new refresh candidate %p with timeout %d",
memcpy (&cand->stun_agent, &cdisco->stun_agent, sizeof(StunAgent)); agent, cand, (lifetime - 60) * 1000);
nice_debug ("Agent %p : Adding new refresh candidate %p with timeout %d",
agent, cand, (lifetime - 60) * 1000); /* step: also start the refresh timer */
agent->refresh_list = modified_list; /* refresh should be sent 1 minute before it expires */
cand->timer_source =
/* step: also start the refresh timer */ agent_timeout_add_with_context (agent, (lifetime - 60) * 1000,
/* refresh should be sent 1 minute before it expires */ priv_turn_allocate_refresh_tick, cand);
cand->timer_source =
agent_timeout_add_with_context (agent, (lifetime - 60) * 1000, nice_debug ("timer source is : %d", cand->timer_source);
priv_turn_allocate_refresh_tick, cand);
nice_debug ("timer source is : %d", cand->timer_source);
}
}
return cand; return cand;
} }
......
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