summaryrefslogtreecommitdiffstats
path: root/jingle
diff options
context:
space:
mode:
Diffstat (limited to 'jingle')
-rw-r--r--jingle/notifier/base/chrome_async_socket.cc3
-rw-r--r--jingle/notifier/communicator/xmpp_connection_generator.cc15
2 files changed, 8 insertions, 10 deletions
diff --git a/jingle/notifier/base/chrome_async_socket.cc b/jingle/notifier/base/chrome_async_socket.cc
index e3a243f..1fba65c 100644
--- a/jingle/notifier/base/chrome_async_socket.cc
+++ b/jingle/notifier/base/chrome_async_socket.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -19,7 +19,6 @@
#include "net/base/io_buffer.h"
#include "net/base/net_util.h"
#include "net/base/ssl_config_service.h"
-#include "net/base/sys_addrinfo.h"
#include "net/socket/client_socket_factory.h"
#include "net/socket/client_socket_handle.h"
#include "net/socket/ssl_client_socket.h"
diff --git a/jingle/notifier/communicator/xmpp_connection_generator.cc b/jingle/notifier/communicator/xmpp_connection_generator.cc
index d1a9404a..3611dae0 100644
--- a/jingle/notifier/communicator/xmpp_connection_generator.cc
+++ b/jingle/notifier/communicator/xmpp_connection_generator.cc
@@ -23,7 +23,6 @@
#include "jingle/notifier/communicator/connection_options.h"
#include "jingle/notifier/communicator/connection_settings.h"
#include "net/base/net_errors.h"
-#include "net/base/sys_addrinfo.h"
#include "talk/base/httpcommon-inl.h"
#include "talk/base/task.h"
#include "talk/base/thread.h"
@@ -156,17 +155,17 @@ void XmppConnectionGenerator::HandleServerDNSResolved(int status) {
}
// Slurp the addresses into a vector.
- std::vector<uint32> ip_list;
- for (const addrinfo* addr = address_list_.head();
- addr != NULL; addr = addr->ai_next) {
- const sockaddr_in& sockaddr =
- *reinterpret_cast<const sockaddr_in*>(addr->ai_addr);
- uint32 ip = talk_base::NetworkToHost32(sockaddr.sin_addr.s_addr);
+ std::vector<uint32> ip_list; // TODO(szym): not IPv6-safe.
+ for (size_t i = 0; i < address_list_.size(); ++i) {
+ const net::IPEndPoint& addr = address_list_[i];
+ DCHECK_EQ(addr.GetFamily(), AF_INET);
+ uint32 ip = talk_base::NetworkToHost32(
+ *reinterpret_cast<const uint32*>(&addr.address()[0]));
ip_list.push_back(ip);
}
successfully_resolved_dns_ = !ip_list.empty();
- for (int i = 0; i < static_cast<int>(ip_list.size()); ++i) {
+ for (size_t i = 0; i < ip_list.size(); ++i) {
VLOG(1) << " ip " << i
<< " : " << talk_base::SocketAddress::IPToString(ip_list[i]);
}