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,13 +2234,10 @@ priv_add_new_turn_refresh (CandidateDiscovery *cdisco, NiceCandidate *relay_cand ...@@ -2234,13 +2234,10 @@ 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);
if (modified_list) {
cand->nicesock = cdisco->nicesock; cand->nicesock = cdisco->nicesock;
cand->relay_socket = relay_cand->sockptr; cand->relay_socket = relay_cand->sockptr;
cand->server = cdisco->server; cand->server = cdisco->server;
...@@ -2251,7 +2248,6 @@ priv_add_new_turn_refresh (CandidateDiscovery *cdisco, NiceCandidate *relay_cand ...@@ -2251,7 +2248,6 @@ priv_add_new_turn_refresh (CandidateDiscovery *cdisco, NiceCandidate *relay_cand
memcpy (&cand->stun_agent, &cdisco->stun_agent, sizeof(StunAgent)); memcpy (&cand->stun_agent, &cdisco->stun_agent, sizeof(StunAgent));
nice_debug ("Agent %p : Adding new refresh candidate %p with timeout %d", nice_debug ("Agent %p : Adding new refresh candidate %p with timeout %d",
agent, cand, (lifetime - 60) * 1000); agent, cand, (lifetime - 60) * 1000);
agent->refresh_list = modified_list;
/* step: also start the refresh timer */ /* step: also start the refresh timer */
/* refresh should be sent 1 minute before it expires */ /* refresh should be sent 1 minute before it expires */
...@@ -2260,8 +2256,6 @@ priv_add_new_turn_refresh (CandidateDiscovery *cdisco, NiceCandidate *relay_cand ...@@ -2260,8 +2256,6 @@ priv_add_new_turn_refresh (CandidateDiscovery *cdisco, NiceCandidate *relay_cand
priv_turn_allocate_refresh_tick, cand); priv_turn_allocate_refresh_tick, cand);
nice_debug ("timer source is : %d", cand->timer_source); 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