Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(161)

Side by Side Diff: remoting/client/plugin/pepper_network_manager.cc

Issue 336113002: Avoid error messages from UDP sockets in Chromoting client. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | remoting/client/plugin/pepper_packet_socket_factory.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "remoting/client/plugin/pepper_network_manager.h" 5 #include "remoting/client/plugin/pepper_network_manager.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 #include "base/thread_task_runner_handle.h" 10 #include "base/thread_task_runner_handle.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 for (size_t i = 0; i < count; i++) { 69 for (size_t i = 0; i < count; i++) {
70 std::vector<pp::NetAddress> addresses; 70 std::vector<pp::NetAddress> addresses;
71 list.GetIpAddresses(i, &addresses); 71 list.GetIpAddresses(i, &addresses);
72 72
73 if (addresses.size() == 0) 73 if (addresses.size() == 0)
74 continue; 74 continue;
75 75
76 for (size_t i = 0; i < addresses.size(); ++i) { 76 for (size_t i = 0; i < addresses.size(); ++i) {
77 talk_base::SocketAddress address; 77 talk_base::SocketAddress address;
78 PpNetAddressToSocketAddress(addresses[i], &address); 78 PpNetAddressToSocketAddress(addresses[i], &address);
79
80 if (address.family() == AF_INET6 && IPIsSiteLocal(address.ipaddr())) {
81 // Link-local IPv6 addresses can't be bound via the current PPAPI
82 // Bind() interface as designed (see crbug.com/384854); trying to do so
83 // would fail.
84 continue;
85 }
86
79 talk_base::Network* network = new talk_base::Network( 87 talk_base::Network* network = new talk_base::Network(
80 list.GetName(i), list.GetDisplayName(i), address.ipaddr(), 0); 88 list.GetName(i), list.GetDisplayName(i), address.ipaddr(), 0);
81 network->AddIP(address.ipaddr()); 89 network->AddIP(address.ipaddr());
82 networks.push_back(network); 90 networks.push_back(network);
83 } 91 }
84 } 92 }
85 93
86 bool changed = false; 94 bool changed = false;
87 MergeNetworkList(networks, &changed); 95 MergeNetworkList(networks, &changed);
88 if (changed) 96 if (changed)
89 SignalNetworksChanged(); 97 SignalNetworksChanged();
90 } 98 }
91 99
92 void PepperNetworkManager::SendNetworksChangedSignal() { 100 void PepperNetworkManager::SendNetworksChangedSignal() {
93 SignalNetworksChanged(); 101 SignalNetworksChanged();
94 } 102 }
95 103
96 } // namespace remoting 104 } // namespace remoting
OLDNEW
« no previous file with comments | « no previous file | remoting/client/plugin/pepper_packet_socket_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698