From: Olivier CrĂȘte Date: Tue, 12 Aug 2014 22:40:47 +0000 (-0400) Subject: conncheck: Go to connected only if the component was connected or ready X-Git-Tag: 0.1.8~105 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fac1c1883a1db3cc56b3cb5d59d0eb50737a8c8d;p=platform%2Fupstream%2Flibnice.git 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. --- 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); } }