Commit e9cbb3da authored by Fabrice Bellet's avatar Fabrice Bellet Committed by Olivier Crête

conncheck: update the unfreeze method for RFC8445

The way pairs are unfrozen between RFC5245 and RFC8445 changed a bit,
and made the code much more simple. Previously pairs were unfrozen "per
stream", not they are unfrozen "per foundation". The principle of the
priv_conn_check_unfreeze_next function is now to unfreeze one and only
one frozen pair per foundation, all components and streams included.
The function is now idemporent: calling it when the connchecks still
contains waiting pairs does nothing.
parent 0f6eadc9
...@@ -3532,6 +3532,8 @@ static void priv_update_pair_foundations (NiceAgent *agent, ...@@ -3532,6 +3532,8 @@ static void priv_update_pair_foundations (NiceAgent *agent,
NICE_CANDIDATE_PAIR_MAX_FOUNDATION); NICE_CANDIDATE_PAIR_MAX_FOUNDATION);
nice_debug ("Agent %p : Updating pair %p foundation to '%s'", nice_debug ("Agent %p : Updating pair %p foundation to '%s'",
agent, pair, pair->foundation); agent, pair, pair->foundation);
if (pair->state == NICE_CHECK_SUCCEEDED)
conn_check_unfreeze_related (agent, pair);
if (component->selected_pair.local == pair->local && if (component->selected_pair.local == pair->local &&
component->selected_pair.remote == pair->remote) { component->selected_pair.remote == pair->remote) {
gchar priority[NICE_CANDIDATE_PAIR_PRIORITY_MAX_SIZE]; gchar priority[NICE_CANDIDATE_PAIR_PRIORITY_MAX_SIZE];
......
This diff is collapsed.
...@@ -123,6 +123,7 @@ void conn_check_update_selected_pair (NiceAgent *agent, ...@@ -123,6 +123,7 @@ void conn_check_update_selected_pair (NiceAgent *agent,
NiceComponent *component, CandidateCheckPair *pair); NiceComponent *component, CandidateCheckPair *pair);
void conn_check_update_check_list_state_for_ready (NiceAgent *agent, void conn_check_update_check_list_state_for_ready (NiceAgent *agent,
NiceStream *stream, NiceComponent *component); NiceStream *stream, NiceComponent *component);
void conn_check_unfreeze_related (NiceAgent *agent, CandidateCheckPair *pair);
#endif /*_NICE_CONNCHECK_H */ #endif /*_NICE_CONNCHECK_H */
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