Commit 4b7ae860 authored by Olivier Crête's avatar Olivier Crête

discovery: Make it less likely that a locally assigned remote foundation...

discovery: Make it less likely that a locally assigned remote foundation clashes with the remote one.
parent 9be4b5a0
......@@ -292,7 +292,8 @@ static guint priv_highest_remote_foundation (Component *component)
for (highest = 1;; highest++) {
gboolean taken = FALSE;
g_snprintf (foundation, NICE_CANDIDATE_MAX_FOUNDATION, "%u", highest);
g_snprintf (foundation, NICE_CANDIDATE_MAX_FOUNDATION, "remote-%u",
highest);
for (i = component->remote_candidates; i; i = i->next) {
NiceCandidate *cand = i->data;
if (strncmp (foundation, cand->foundation,
......@@ -422,7 +423,7 @@ static void priv_assign_remote_foundation (NiceAgent *agent, NiceCandidate *cand
if (component) {
next_remote_id = priv_highest_remote_foundation (component);
g_snprintf (candidate->foundation, NICE_CANDIDATE_MAX_FOUNDATION,
"%u", next_remote_id);
"remote-%u", next_remote_id);
}
}
......
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