Commit a2fb11fc authored by Fabrice Bellet's avatar Fabrice Bellet Committed by Olivier Crête
Browse files

conncheck: simplify the test to find a matching local candidate

Since we keep a relation between a succeeded and its discovered pair, we
can just test for the socket associated to a given pair, and eventually
follow the link to the parent succeeded pair.
parent e7b04942
......@@ -3203,13 +3203,9 @@ static gboolean priv_schedule_triggered_check (NiceAgent *agent, NiceStream *str
p = i->data;
if (p->component_id == component->id &&
p->remote == remote_cand &&
((p->local->transport == NICE_CANDIDATE_TRANSPORT_TCP_PASSIVE &&
p->sockptr == local_socket) ||
p->local->sockptr == local_socket))) {
/* We don't check for p->sockptr because in the case of
* tcp-active we don't want to retrigger a check on a pair that
* was FAILED when a peer-reflexive pair was created */
p->sockptr == local_socket) {
/* If we match with a peer-reflexive discovered pair, we
* use the parent succeeded pair instead */
if (p->succeeded_pair != NULL) {
g_assert_cmpint (p->state, ==, NICE_CHECK_DISCOVERED);
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