Commit fac1c188 authored by Olivier Crête's avatar Olivier Crête
Browse files

conncheck: Go to connected only if the component was connected or ready

Otherwise, it claimed it was connected when the component was in the FAILED
state, when it should really have gone to connecting.
parent b8f0eede
...@@ -1360,16 +1360,17 @@ static void priv_conn_check_add_for_candidate_pair_matched (NiceAgent *agent, ...@@ -1360,16 +1360,17 @@ static void priv_conn_check_add_for_candidate_pair_matched (NiceAgent *agent,
local->foundation, remote->foundation); local->foundation, remote->foundation);
priv_add_new_check_pair (agent, stream_id, component, local, remote, priv_add_new_check_pair (agent, stream_id, component, local, remote,
initial_state, FALSE); initial_state, FALSE);
if (component->state < NICE_COMPONENT_STATE_CONNECTED) { if (component->state == NICE_COMPONENT_STATE_CONNECTED ||
component->state == NICE_COMPONENT_STATE_READY) {
agent_signal_component_state_change (agent, agent_signal_component_state_change (agent,
stream_id, stream_id,
component->id, component->id,
NICE_COMPONENT_STATE_CONNECTING); NICE_COMPONENT_STATE_CONNECTED);
} else { } else {
agent_signal_component_state_change (agent, agent_signal_component_state_change (agent,
stream_id, stream_id,
component->id, component->id,
NICE_COMPONENT_STATE_CONNECTED); NICE_COMPONENT_STATE_CONNECTING);
} }
} }
......
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