Bug 1215616: use base address for server rflx ICE candidates r=bwc, a=sylvestre
authorNils Ohlmeier [:drno] <drno@ohlmeier.org>
Sat, 17 Oct 2015 11:34:01 -0400
changeset 296506 563f8cbe3bf6c5c84b8f09173f0b3de6343e6dbe
parent 296505 bf8cc392cec6afb31ee716e78ae22b119172ea7a
child 296507 2e69beaa47cda42cc26f84409151fb33af3efbfe
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbwc, sylvestre
bugs1215616
milestone43.0a2
Bug 1215616: use base address for server rflx ICE candidates r=bwc, a=sylvestre
media/mtransport/third_party/nICEr/src/ice/ice_candidate.c
--- a/media/mtransport/third_party/nICEr/src/ice/ice_candidate.c
+++ b/media/mtransport/third_party/nICEr/src/ice/ice_candidate.c
@@ -936,18 +936,19 @@ int nr_ice_format_candidate_attribute(nr
       port=9;
     snprintf(attr,maxlen,"candidate:%s %d %s %u %s %d typ %s",
       cand->foundation, cand->component_id, cand->addr.protocol==IPPROTO_UDP?"UDP":"TCP",cand->priority, addr, port,
       nr_ctype_name(cand->type));
 
     len=strlen(attr); attr+=len; maxlen-=len;
 
     /* raddr, rport */
-    raddr = (cand->stream->ctx->flags & NR_ICE_CTX_FLAGS_RELAY_ONLY |
-             NR_ICE_CTX_FLAGS_ONLY_DEFAULT_ADDRS) ?
+    raddr = (cand->stream->ctx->flags &
+             (NR_ICE_CTX_FLAGS_RELAY_ONLY |
+              NR_ICE_CTX_FLAGS_ONLY_DEFAULT_ADDRS)) ?
       &cand->addr : &cand->base;
 
     switch(cand->type){
       case HOST:
         break;
       case SERVER_REFLEXIVE:
       case PEER_REFLEXIVE:
         if(r=nr_transport_addr_get_addrstring(raddr,addr,sizeof(addr)))