diff options
author | Fabrice Bellet <fabrice@bellet.info> | 2020-05-17 23:08:12 +0200 |
---|---|---|
committer | Fabrice Bellet <fabrice@bellet.info> | 2020-05-18 15:21:45 +0200 |
commit | ecc1c42f22c599e229464527db87c3e660aa58e1 (patch) | |
tree | 6dbdc0e0ceab9ee1efd9284795aeb324cc6c758c | |
parent | b57354e261b5352158f2f049ea4abd5f1fb90e95 (diff) | |
download | libnice-ecc1c42f22c599e229464527db87c3e660aa58e1.tar.gz |
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.
-rw-r--r-- | agent/conncheck.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/agent/conncheck.c b/agent/conncheck.c index ee12527..f2839bb 100644 --- a/agent/conncheck.c +++ b/agent/conncheck.c @@ -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; |