aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-03-14 12:32:22 -0700
committerJosh Blum <josh@joshknows.com>2011-03-14 12:32:22 -0700
commitf8225c053bdc77fb966883b5724a60a601e6fd0d (patch)
tree59ce94bc421fc2a3f14c947e66535768e6cb3004 /host/lib
parentc6c65f5069815df664e4636f5beb661ad85e0d72 (diff)
parentd3e336f4177962daf56520fcb759df8a313599ac (diff)
downloaduhd-f8225c053bdc77fb966883b5724a60a601e6fd0d.tar.gz
uhd-f8225c053bdc77fb966883b5724a60a601e6fd0d.tar.bz2
uhd-f8225c053bdc77fb966883b5724a60a601e6fd0d.zip
Merge branch 'windows_fix' into next
Diffstat (limited to 'host/lib')
-rw-r--r--host/lib/usrp/usrp2/usrp2_impl.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/host/lib/usrp/usrp2/usrp2_impl.cpp b/host/lib/usrp/usrp2/usrp2_impl.cpp
index 505df662a..0d0d582fa 100644
--- a/host/lib/usrp/usrp2/usrp2_impl.cpp
+++ b/host/lib/usrp/usrp2/usrp2_impl.cpp
@@ -31,6 +31,7 @@
#include <boost/lexical_cast.hpp>
#include <boost/bind.hpp>
#include <boost/asio/ip/address_v4.hpp>
+#include <boost/asio.hpp> //used for htonl and ntohl
#include <iostream>
#include <vector>
@@ -103,9 +104,9 @@ static device_addrs_t usrp2_find(const device_addr_t &hint_){
while(true){
size_t len = udp_transport->recv(asio::buffer(usrp2_ctrl_data_in_mem));
//std::cout << len << "\n";
- if (len > offsetof(usrp2_ctrl_data_t, data) and uhd::ntohx(ctrl_data_in->id) == USRP2_CTRL_ID_WAZZUP_DUDE){
+ if (len > offsetof(usrp2_ctrl_data_t, data) and ntohl(ctrl_data_in->id) == USRP2_CTRL_ID_WAZZUP_DUDE){
//make a boost asio ipv4 with the raw addr in host byte order
- boost::asio::ip::address_v4 ip_addr(uhd::ntohx(ctrl_data_in->data.ip_addr));
+ boost::asio::ip::address_v4 ip_addr(ntohl(ctrl_data_in->data.ip_addr));
device_addr_t new_addr;
new_addr["type"] = "usrp2";
new_addr["addr"] = ip_addr.to_string();