summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiguel París Díaz <mparisdiaz@gmail.com>2016-07-05 14:42:44 +0200
committerOlivier Crête <olivier.crete@collabora.com>2018-06-06 10:37:33 +0200
commita353ab3beb5182857f24b9bf8771da2fa3f8c79a (patch)
treea57aebd23065e0b40617658703660f749606f947
parent28744ab6be036b020428e93f39862e76d5ecd285 (diff)
downloadlibnice-a353ab3beb5182857f24b9bf8771da2fa3f8c79a.tar.gz
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
-rw-r--r--agent/discovery.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/agent/discovery.c b/agent/discovery.c
index e2142a2..30a9539 100644
--- a/agent/discovery.c
+++ b/agent/discovery.c
@@ -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);
}
}