Bug 1336507 - Part 3: Make sure mozLocalTransport is set to "tls" where appropriate. r=drno
authorByron Campen [:bwc] <docfaraday@gmail.com>
Fri, 03 Feb 2017 16:48:02 -0600
changeset 341100 31bf2f8302b05449734c5fe6696521db9333c08a
parent 341099 73fb6dab1ea936806d18cbea8012fa20435879a5
child 341101 f3da0505833f946d1b1767986ebb8e3d7a63f5c1
push id86634
push usercbook@mozilla.com
push dateTue, 07 Feb 2017 13:14:58 +0000
treeherdermozilla-inbound@9dbd2d9b334e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdrno
bugs1336507
milestone54.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1336507 - Part 3: Make sure mozLocalTransport is set to "tls" where appropriate. r=drno MozReview-Commit-ID: EQCKgaFlA3q
media/mtransport/nricemediastream.cpp
--- a/media/mtransport/nricemediastream.cpp
+++ b/media/mtransport/nricemediastream.cpp
@@ -86,17 +86,21 @@ static bool ToNrIceAddr(nr_transport_add
   r = nr_transport_addr_get_port(&addr, &port);
   if (r)
     return false;
 
   out->port = port;
 
   switch (addr.protocol) {
     case IPPROTO_TCP:
-      out->transport = kNrIceTransportTcp;
+      if (addr.tls_host[0] != '\0') {
+        out->transport = kNrIceTransportTls;
+      } else {
+        out->transport = kNrIceTransportTcp;
+      }
       break;
     case IPPROTO_UDP:
       out->transport = kNrIceTransportUdp;
       break;
     default:
       MOZ_CRASH();
       return false;
   }