| Index: jingle/glue/utils.cc
|
| diff --git a/jingle/glue/utils.cc b/jingle/glue/utils.cc
|
| index d74c6bc2debe674980f6eb0187687f34b1574c44..1a8413b4ee4d0bdb06308707d4e83064b92a97aa 100644
|
| --- a/jingle/glue/utils.cc
|
| +++ b/jingle/glue/utils.cc
|
| @@ -11,6 +11,7 @@
|
| #include "base/logging.h"
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/values.h"
|
| +#include "net/base/ip_address.h"
|
| #include "net/base/ip_endpoint.h"
|
| #include "third_party/webrtc/base/byteorder.h"
|
| #include "third_party/webrtc/base/socketaddress.h"
|
| @@ -34,17 +35,16 @@ bool SocketAddressToIPEndPoint(const rtc::SocketAddress& address,
|
| ip_endpoint->FromSockAddr(reinterpret_cast<sockaddr*>(&addr), size);
|
| }
|
|
|
| -rtc::IPAddress IPAddressNumberToIPAddress(
|
| - const net::IPAddressNumber& ip_address_number) {
|
| - if (ip_address_number.size() == net::kIPv4AddressSize) {
|
| +rtc::IPAddress NetIPAddressToIPAddress(const net::IPAddress& ip_address) {
|
| + if (ip_address.IsIPv4()) {
|
| uint32_t address;
|
| - memcpy(&address, &ip_address_number[0], sizeof(uint32_t));
|
| + memcpy(&address, ip_address.bytes().data(), sizeof(uint32_t));
|
| address = rtc::NetworkToHost32(address);
|
| return rtc::IPAddress(address);
|
| }
|
| - if (ip_address_number.size() == net::kIPv6AddressSize) {
|
| + if (ip_address.IsIPv6()) {
|
| in6_addr address;
|
| - memcpy(&address, &ip_address_number[0], sizeof(in6_addr));
|
| + memcpy(&address, ip_address.bytes().data(), sizeof(in6_addr));
|
| return rtc::IPAddress(address);
|
| }
|
| return rtc::IPAddress();
|
|
|