From fac1c1883a1db3cc56b3cb5d59d0eb50737a8c8d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Olivier=20Cr=C3=AAte?= Date: Tue, 12 Aug 2014 18:40:47 -0400 Subject: [PATCH] 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. --- agent/conncheck.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/agent/conncheck.c b/agent/conncheck.c index 00a533a..ad17ede 100644 --- a/agent/conncheck.c +++ b/agent/conncheck.c @@ -1360,16 +1360,17 @@ static void priv_conn_check_add_for_candidate_pair_matched (NiceAgent *agent, local->foundation, remote->foundation); priv_add_new_check_pair (agent, stream_id, component, local, remote, 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, stream_id, component->id, - NICE_COMPONENT_STATE_CONNECTING); + NICE_COMPONENT_STATE_CONNECTED); } else { agent_signal_component_state_change (agent, stream_id, component->id, - NICE_COMPONENT_STATE_CONNECTED); + NICE_COMPONENT_STATE_CONNECTING); } } -- 2.7.4