For backwards compatibility, add scheme stun: to STUN server URI if missing.

This commit is contained in:
Juha Heinanen
2020-06-17 20:14:18 +03:00
parent e7af96f321
commit 9f0c261387

View File

@ -94,7 +94,11 @@ class Account(val accp: String) {
if (mediaNat != "") res = res + ";medianat=${mediaNat}"
if (stunServer != "") res = res + ";stunserver=\"${stunServer}\""
if (stunServer != "") {
if (!stunServer.startsWith("stun") && !stunServer.startsWith("turn"))
stunServer = "stun:$stunServer"
res += ";stunserver=\"${stunServer}\""
}
if (stunUser != "") res = res + ";stunuser=\"${stunUser}\""