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 762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
773 scoped_ptr<AsyncSocket> socket( | 773 scoped_ptr<AsyncSocket> socket( |
774 thread_->socketserver()->CreateAsyncSocket(family, SOCK_DGRAM)); | 774 thread_->socketserver()->CreateAsyncSocket(family, SOCK_DGRAM)); |
775 if (!socket) { | 775 if (!socket) { |
776 LOG_ERR(LERROR) << "Socket creation failed"; | 776 LOG_ERR(LERROR) << "Socket creation failed"; |
777 return IPAddress(); | 777 return IPAddress(); |
778 } | 778 } |
779 | 779 |
780 if (socket->Connect(SocketAddress( | 780 if (socket->Connect(SocketAddress( |
781 family == AF_INET ? kPublicIPv4Host : kPublicIPv6Host, kPublicPort)) < | 781 family == AF_INET ? kPublicIPv4Host : kPublicIPv6Host, kPublicPort)) < |
782 0) { | 782 0) { |
783 LOG_ERR(LERROR) << "Connect failed with " << socket->GetError(); | 783 LOG(LS_INFO) << "Connect failed with " << socket->GetError(); |
784 return IPAddress(); | 784 return IPAddress(); |
785 } | 785 } |
786 return socket->GetLocalAddress().ipaddr(); | 786 return socket->GetLocalAddress().ipaddr(); |
787 } | 787 } |
788 | 788 |
789 void BasicNetworkManager::UpdateNetworksOnce() { | 789 void BasicNetworkManager::UpdateNetworksOnce() { |
790 if (!start_count_) | 790 if (!start_count_) |
791 return; | 791 return; |
792 | 792 |
793 ASSERT(Thread::Current() == thread_); | 793 ASSERT(Thread::Current() == thread_); |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
916 std::stringstream ss; | 916 std::stringstream ss; |
917 // Print out the first space-terminated token of the network desc, plus | 917 // Print out the first space-terminated token of the network desc, plus |
918 // the IP address. | 918 // the IP address. |
919 ss << "Net[" << description_.substr(0, description_.find(' ')) | 919 ss << "Net[" << description_.substr(0, description_.find(' ')) |
920 << ":" << prefix_.ToSensitiveString() << "/" << prefix_length_ | 920 << ":" << prefix_.ToSensitiveString() << "/" << prefix_length_ |
921 << ":" << AdapterTypeToString(type_) << "]"; | 921 << ":" << AdapterTypeToString(type_) << "]"; |
922 return ss.str(); | 922 return ss.str(); |
923 } | 923 } |
924 | 924 |
925 } // namespace rtc | 925 } // namespace rtc |
OLD | NEW |