Commit 02a352c9 authored by Youness Alaoui's avatar Youness Alaoui

Make sure the address of the remote candidate is valid when we add it

parent 2796330b
...@@ -2165,6 +2165,8 @@ nice_agent_set_remote_candidates (NiceAgent *agent, guint stream_id, guint compo ...@@ -2165,6 +2165,8 @@ nice_agent_set_remote_candidates (NiceAgent *agent, guint stream_id, guint compo
for (i = candidates; i && added >= 0; i = i->next) { for (i = candidates; i && added >= 0; i = i->next) {
NiceCandidate *d = (NiceCandidate*) i->data; NiceCandidate *d = (NiceCandidate*) i->data;
if (nice_address_is_valid (&d->addr) == TRUE) {
gboolean res = gboolean res =
priv_add_remote_candidate (agent, priv_add_remote_candidate (agent,
stream_id, stream_id,
...@@ -2182,6 +2184,7 @@ nice_agent_set_remote_candidates (NiceAgent *agent, guint stream_id, guint compo ...@@ -2182,6 +2184,7 @@ nice_agent_set_remote_candidates (NiceAgent *agent, guint stream_id, guint compo
else else
added = -1; added = -1;
} }
}
conn_check_remote_candidates_set(agent); conn_check_remote_candidates_set(agent);
......
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