diff options
author | Josh Blum <josh@joshknows.com> | 2011-12-21 13:05:44 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-12-21 13:05:44 -0800 |
commit | 9f0a1e3148251c820a73c8a33da92e54aaffee6d (patch) | |
tree | d74b28fdd92a9969c4d71e0cbd5c1425e1ea4dc7 /host/lib/usrp/usrp2/usrp2_impl.cpp | |
parent | 81289ab0510c847daacf75e261cad2de5cd7d508 (diff) | |
parent | bdb267b9f445e929f765b481c038edbd6310ce85 (diff) | |
download | uhd-9f0a1e3148251c820a73c8a33da92e54aaffee6d.tar.gz uhd-9f0a1e3148251c820a73c8a33da92e54aaffee6d.tar.bz2 uhd-9f0a1e3148251c820a73c8a33da92e54aaffee6d.zip |
Merge branch 'network_foo'
Diffstat (limited to 'host/lib/usrp/usrp2/usrp2_impl.cpp')
-rw-r--r-- | host/lib/usrp/usrp2/usrp2_impl.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/host/lib/usrp/usrp2/usrp2_impl.cpp b/host/lib/usrp/usrp2/usrp2_impl.cpp index 87e5596a3..4d7f221c6 100644 --- a/host/lib/usrp/usrp2/usrp2_impl.cpp +++ b/host/lib/usrp/usrp2/usrp2_impl.cpp @@ -113,10 +113,13 @@ static device_addrs_t usrp2_find(const device_addr_t &hint_){ 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(ntohl(ctrl_data_in->data.ip_addr)); device_addr_t new_addr; new_addr["type"] = "usrp2"; - new_addr["addr"] = ip_addr.to_string(); + //We used to get the address from the control packet. + //Now now uses the socket itself to yield the address. + //boost::asio::ip::address_v4 ip_addr(ntohl(ctrl_data_in->data.ip_addr)); + //new_addr["addr"] = ip_addr.to_string(); + new_addr["addr"] = udp_transport->get_recv_addr(); //Attempt to read the name from the EEPROM and perform filtering. //This operation can throw due to compatibility mismatch. |