Backed out changeset ce887b471785 (bug 961313) for buffered_stun_socket_unittest crashes, again.
authorRyan VanderMeulen <ryanvm@gmail.com>
Mon, 27 Jan 2014 09:41:48 -0500
changeset 165328 02118ca19721
parent 165327 0c844a426068
child 165329 3cd6de67ba6b
push id38945
push userryanvm@gmail.com
push date2014-01-27 14:41 +0000
treeherdermozilla-inbound@02118ca19721 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs961313
milestone29.0a1
backs outce887b471785
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
Backed out changeset ce887b471785 (bug 961313) for buffered_stun_socket_unittest crashes, again.
media/mtransport/third_party/nICEr/src/net/transport_addr.c
media/mtransport/third_party/nICEr/src/net/transport_addr.h
--- a/media/mtransport/third_party/nICEr/src/net/transport_addr.c
+++ b/media/mtransport/third_party/nICEr/src/net/transport_addr.c
@@ -52,39 +52,27 @@ static char *RCSSTRING __UNUSED__="$Id: 
 #include "nr_api.h"
 #include "transport_addr.h"
 
 int nr_transport_addr_fmt_addr_string(nr_transport_addr *addr)
   {
     int _status;
     /* Max length for normalized IPv6 address string represntation is 39 */
     char buffer[40];
-    const char *protocol;
-
-    switch(addr->protocol){
-      case IPPROTO_TCP:
-        protocol = "TCP";
-        break;
-      case IPPROTO_UDP:
-        protocol = "UDP";
-        break;
-      default:
-        ABORT(R_INTERNAL);
-    }
 
     switch(addr->ip_version){
       case NR_IPV4:
         if (!inet_ntop(AF_INET, &addr->u.addr4.sin_addr,buffer,sizeof(buffer)))
           strcpy(buffer, "[error]");
-        snprintf(addr->as_string,sizeof(addr->as_string),"IP4:%s:%d/%s",buffer,ntohs(addr->u.addr4.sin_port),protocol);
+        snprintf(addr->as_string,sizeof(addr->as_string),"IP4:%s:%d",buffer,ntohs(addr->u.addr4.sin_port));
         break;
       case NR_IPV6:
         if (!inet_ntop(AF_INET6, &addr->u.addr6.sin6_addr,buffer,sizeof(buffer)))
           strcpy(buffer, "[error]");
-        snprintf(addr->as_string,sizeof(addr->as_string),"IP6:[%s]:%d/%s",buffer,ntohs(addr->u.addr6.sin6_port),protocol);
+        snprintf(addr->as_string,sizeof(addr->as_string),"IP6:[%s]:%d",buffer,ntohs(addr->u.addr6.sin6_port));
         break;
       default:
         ABORT(R_INTERNAL);
     }
 
     _status=0;
   abort:
     return(_status);
--- a/media/mtransport/third_party/nICEr/src/net/transport_addr.h
+++ b/media/mtransport/third_party/nICEr/src/net/transport_addr.h
@@ -62,18 +62,18 @@ typedef struct nr_transport_addr_ {
   struct sockaddr *addr;
   int addr_len;
   union {
     struct sockaddr_in addr4;
     struct sockaddr_in6 addr6;
   } u;
   char ifname[MAXIFNAME];
   /* A string version.
-     56 = 5 ("IP6:[") + 39 (ipv6 address) + 2 ("]:") + 5 (port) + 4 (/UDP) + 1 (null) */
-  char as_string[56];
+     52 = 5 ("IP6:[") + 39 (ipv6 address) + 2 ("]:") + 5 (port) + 1 (null) */
+  char as_string[52];
 } nr_transport_addr;
 
 int nr_sockaddr_to_transport_addr(struct sockaddr *saddr, int saddr_len, int protocol, int keep, nr_transport_addr *addr);
 
 // addresses, ports in local byte order
 int nr_ip4_port_to_transport_addr(UINT4 ip4, UINT2 port, int protocol, nr_transport_addr *addr);
 int nr_ip4_str_port_to_transport_addr(const char *ip4, UINT2 port, int protocol, nr_transport_addr *addr);