summaryrefslogtreecommitdiffstats
path: root/jingle
diff options
context:
space:
mode:
Diffstat (limited to 'jingle')
-rw-r--r--jingle/glue/fake_network_manager.cc5
-rw-r--r--jingle/notifier/communicator/xmpp_connection_generator.cc4
2 files changed, 5 insertions, 4 deletions
diff --git a/jingle/glue/fake_network_manager.cc b/jingle/glue/fake_network_manager.cc
index 34d0c0b..7884301 100644
--- a/jingle/glue/fake_network_manager.cc
+++ b/jingle/glue/fake_network_manager.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.
@@ -20,7 +20,8 @@ FakeNetworkManager::FakeNetworkManager(const net::IPAddressNumber& address)
talk_base::SocketAddress socket_address;
CHECK(IPEndPointToSocketAddress(endpoint, &socket_address));
network_.reset(new talk_base::Network("fake", "Fake Network",
- socket_address.ipaddr()));
+ socket_address.ipaddr(), 32));
+ network_->AddIP(socket_address.ipaddr());
}
FakeNetworkManager::~FakeNetworkManager() {
diff --git a/jingle/notifier/communicator/xmpp_connection_generator.cc b/jingle/notifier/communicator/xmpp_connection_generator.cc
index 3a05d9c..d1a9404a 100644
--- a/jingle/notifier/communicator/xmpp_connection_generator.cc
+++ b/jingle/notifier/communicator/xmpp_connection_generator.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.
//
@@ -161,7 +161,7 @@ void XmppConnectionGenerator::HandleServerDNSResolved(int status) {
addr != NULL; addr = addr->ai_next) {
const sockaddr_in& sockaddr =
*reinterpret_cast<const sockaddr_in*>(addr->ai_addr);
- uint32 ip = ntohl(sockaddr.sin_addr.s_addr);
+ uint32 ip = talk_base::NetworkToHost32(sockaddr.sin_addr.s_addr);
ip_list.push_back(ip);
}
successfully_resolved_dns_ = !ip_list.empty();