| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 504 if (ret != ERROR_SUCCESS) { | 504 if (ret != ERROR_SUCCESS) { |
| 505 return false; | 505 return false; |
| 506 } | 506 } |
| 507 int count = 0; | 507 int count = 0; |
| 508 while (adapter_addrs) { | 508 while (adapter_addrs) { |
| 509 if (adapter_addrs->OperStatus == IfOperStatusUp) { | 509 if (adapter_addrs->OperStatus == IfOperStatusUp) { |
| 510 PIP_ADAPTER_UNICAST_ADDRESS address = adapter_addrs->FirstUnicastAddress; | 510 PIP_ADAPTER_UNICAST_ADDRESS address = adapter_addrs->FirstUnicastAddress; |
| 511 PIP_ADAPTER_PREFIX prefixlist = adapter_addrs->FirstPrefix; | 511 PIP_ADAPTER_PREFIX prefixlist = adapter_addrs->FirstPrefix; |
| 512 std::string name; | 512 std::string name; |
| 513 std::string description; | 513 std::string description; |
| 514 #ifdef _DEBUG | 514 #if !defined(NDEBUG) |
| 515 name = ToUtf8(adapter_addrs->FriendlyName, | 515 name = ToUtf8(adapter_addrs->FriendlyName, |
| 516 wcslen(adapter_addrs->FriendlyName)); | 516 wcslen(adapter_addrs->FriendlyName)); |
| 517 #endif | 517 #endif |
| 518 description = ToUtf8(adapter_addrs->Description, | 518 description = ToUtf8(adapter_addrs->Description, |
| 519 wcslen(adapter_addrs->Description)); | 519 wcslen(adapter_addrs->Description)); |
| 520 for (; address; address = address->Next) { | 520 for (; address; address = address->Next) { |
| 521 #ifndef _DEBUG | 521 #if defined(NDEBUG) |
| 522 name = rtc::ToString(count); | 522 name = rtc::ToString(count); |
| 523 #endif | 523 #endif |
| 524 | 524 |
| 525 IPAddress ip; | 525 IPAddress ip; |
| 526 int scope_id = 0; | 526 int scope_id = 0; |
| 527 scoped_ptr<Network> network; | 527 scoped_ptr<Network> network; |
| 528 switch (address->Address.lpSockaddr->sa_family) { | 528 switch (address->Address.lpSockaddr->sa_family) { |
| 529 case AF_INET: { | 529 case AF_INET: { |
| 530 sockaddr_in* v4_addr = | 530 sockaddr_in* v4_addr = |
| 531 reinterpret_cast<sockaddr_in*>(address->Address.lpSockaddr); | 531 reinterpret_cast<sockaddr_in*>(address->Address.lpSockaddr); |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 845 std::stringstream ss; | 845 std::stringstream ss; |
| 846 // Print out the first space-terminated token of the network desc, plus | 846 // Print out the first space-terminated token of the network desc, plus |
| 847 // the IP address. | 847 // the IP address. |
| 848 ss << "Net[" << description_.substr(0, description_.find(' ')) | 848 ss << "Net[" << description_.substr(0, description_.find(' ')) |
| 849 << ":" << prefix_.ToSensitiveString() << "/" << prefix_length_ | 849 << ":" << prefix_.ToSensitiveString() << "/" << prefix_length_ |
| 850 << ":" << AdapterTypeToString(type_) << "]"; | 850 << ":" << AdapterTypeToString(type_) << "]"; |
| 851 return ss.str(); | 851 return ss.str(); |
| 852 } | 852 } |
| 853 | 853 |
| 854 } // namespace rtc | 854 } // namespace rtc |
| OLD | NEW |