mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
Bug 1336507 - Part 4: Stop using a magic constant here. r=drno
MozReview-Commit-ID: LgIUrzFFT8I --HG-- extra : rebase_source : 7ab2848cb8510b24a27c3a2e444727b4105e4f23
This commit is contained in:
parent
9699169e39
commit
07596f4b60
@ -567,7 +567,11 @@ PeerConnectionConfiguration::AddIceServer(const RTCIceServer &aServer)
|
||||
|
||||
if (isStuns || isTurns) {
|
||||
// Should we barf if transport is set to udp or something?
|
||||
transport = "tls";
|
||||
transport = kNrIceTransportTls;
|
||||
}
|
||||
|
||||
if (transport.IsEmpty()) {
|
||||
transport = kNrIceTransportUdp;
|
||||
}
|
||||
|
||||
if (isTurn || isTurns) {
|
||||
@ -577,13 +581,11 @@ PeerConnectionConfiguration::AddIceServer(const RTCIceServer &aServer)
|
||||
if (!addTurnServer(host.get(), port,
|
||||
username.get(),
|
||||
credential.get(),
|
||||
(transport.IsEmpty() ?
|
||||
kNrIceTransportUdp : transport.get()))) {
|
||||
transport.get())) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
} else {
|
||||
if (!addStunServer(host.get(), port, (transport.IsEmpty() ?
|
||||
kNrIceTransportUdp : transport.get()))) {
|
||||
if (!addStunServer(host.get(), port, transport.get())) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user