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

agent: don't change agent role when restarting ice

Ice restart must not change the role of the agents since RFC8445,
section 9, "ICE Restarts".
parent d3fd6887
...@@ -5534,14 +5534,6 @@ nice_agent_restart ( ...@@ -5534,14 +5534,6 @@ nice_agent_restart (
agent_lock (agent); agent_lock (agent);
/* step: regenerate tie-breaker value */
priv_generate_tie_breaker (agent);
/* step: reset controlling mode from the property value */
agent->controlling_mode = agent->saved_controlling_mode;
nice_debug ("Agent %p : ICE restart, reset role to \"%s\".",
agent, agent->controlling_mode ? "controlling" : "controlled");
for (i = agent->streams; i; i = i->next) { for (i = agent->streams; i; i = i->next) {
NiceStream *stream = i->data; NiceStream *stream = i->data;
......
...@@ -202,7 +202,6 @@ static int run_restart_test (NiceAgent *lagent, NiceAgent *ragent, NiceAddress * ...@@ -202,7 +202,6 @@ static int run_restart_test (NiceAgent *lagent, NiceAgent *ragent, NiceAddress *
NiceCandidate cdes; NiceCandidate cdes;
GSList *cands; GSList *cands;
guint ls_id, rs_id; guint ls_id, rs_id;
guint64 tie_breaker;
/* XXX: dear compiler, these are for you: */ /* XXX: dear compiler, these are for you: */
(void)baseaddr; (void)baseaddr;
...@@ -338,14 +337,7 @@ static int run_restart_test (NiceAgent *lagent, NiceAgent *ragent, NiceAddress * ...@@ -338,14 +337,7 @@ static int run_restart_test (NiceAgent *lagent, NiceAgent *ragent, NiceAddress *
g_assert (lagent->controlling_mode == TRUE); g_assert (lagent->controlling_mode == TRUE);
g_assert (ragent->controlling_mode == FALSE); g_assert (ragent->controlling_mode == FALSE);
/* step: restart agents, exchange updated credentials */ /* step: restart agents, exchange updated credentials */
tie_breaker = ragent->tie_breaker;
nice_agent_restart (ragent); nice_agent_restart (ragent);
g_assert (tie_breaker != ragent->tie_breaker);
/* This role switch of ragent should be done now, and both agents
* have now the same role, which should generate a role conflict
* resolution situation */
g_assert (lagent->controlling_mode == TRUE);
g_assert (ragent->controlling_mode == TRUE);
nice_agent_restart (lagent); nice_agent_restart (lagent);
{ {
gchar *ufrag = NULL, *password = NULL; gchar *ufrag = NULL, *password = NULL;
......
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