Commit a353ab3b authored by Miguel París Díaz's avatar Miguel París Díaz Committed by Olivier Crête

discovery: fix candidate foundation using valid characters

Following [1] and [2], "-" character is not allowed for foundation

Refs
[1] https://tools.ietf.org/html/rfc5245#page-73
[2] https://tools.ietf.org/html/rfc5234#appendix-B.1
parent 28744ab6
......@@ -338,7 +338,7 @@ static guint priv_highest_remote_foundation (NiceComponent *component)
for (highest = 1;; highest++) {
gboolean taken = FALSE;
g_snprintf (foundation, NICE_CANDIDATE_MAX_FOUNDATION, "remote-%u",
g_snprintf (foundation, NICE_CANDIDATE_MAX_FOUNDATION, "remote%u",
highest);
for (i = component->remote_candidates; i; i = i->next) {
NiceCandidate *cand = i->data;
......@@ -468,7 +468,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,
"remote-%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