Commit ecc1c42f authored by Fabrice Bellet's avatar Fabrice Bellet

conncheck: add a missing component state transition

When reactivating a high priority pair, we have to change back the
component state from ready to connected, since there is a new pair to be
tested.

The case of the succeeded pair is also a bit simplified, the invocation
of the function conn_check_update_check_list_state_for_ready() to
complete the ready - connected - ready flip-flop transition is not
required for the trickle test any longer.
parent b57354e2
......@@ -3166,20 +3166,20 @@ static gboolean priv_schedule_triggered_check (NiceAgent *agent, NiceStream *str
agent_signal_component_state_change (agent, stream->id,
component->id, NICE_COMPONENT_STATE_CONNECTING);
conn_check_schedule_next (agent);
/* If the component if in ready state, move it back to
* connected as this failed pair with a higher priority
* than the nominated pair requires to pursue the
* conncheck
*/
} else if (component->state == NICE_COMPONENT_STATE_READY) {
agent_signal_component_state_change (agent, stream->id,
component->id, NICE_COMPONENT_STATE_CONNECTED);
conn_check_schedule_next (agent);
}
}
break;
case NICE_CHECK_SUCCEEDED:
nice_debug ("Agent %p : nothing to do for pair %p.", agent, p);
/* note: this is a bit unsure corner-case -- let's do the
same state update as for processing responses to our own checks */
/* note: this update is required by the trickle test, to
* ensure the transition ready -> connected -> ready, because
* an incoming stun request generates a discovered peer reflexive,
* that causes the ready -> connected transition.
*/
conn_check_update_check_list_state_for_ready (agent, stream,
component);
break;
default:
break;
......
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