| Index: jingle/glue/utils.cc
|
| diff --git a/jingle/glue/utils.cc b/jingle/glue/utils.cc
|
| index 4c9f4b681029ab9c8cc4df2bd18e834335eb3107..130d0e372b635a1e471b0d2b7064000866a9e32e 100644
|
| --- a/jingle/glue/utils.cc
|
| +++ b/jingle/glue/utils.cc
|
| @@ -33,6 +33,22 @@ 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) {
|
| + uint32_t address;
|
| + memcpy(&address, &ip_address_number[0], sizeof(uint32_t));
|
| + address = rtc::NetworkToHost32(address);
|
| + return rtc::IPAddress(address);
|
| + }
|
| + if (ip_address_number.size() == net::kIPv6AddressSize) {
|
| + in6_addr address;
|
| + memcpy(&address, &ip_address_number[0], sizeof(in6_addr));
|
| + return rtc::IPAddress(address);
|
| + }
|
| + return rtc::IPAddress();
|
| +}
|
| +
|
| std::string SerializeP2PCandidate(const cricket::Candidate& candidate) {
|
| // TODO(sergeyu): Use SDP to format candidates?
|
| base::DictionaryValue value;
|
|
|