summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-06-16 01:08:33 +0000
committerJosh Blum <josh@joshknows.com>2010-06-16 01:08:33 +0000
commit830ce3f8dfc0fcc29c4ad2165bab7a994a3082da (patch)
treec261cd5bc95c3136882493b172b0fab4e93d8edc
parent2a2434d95e2eb10c629f33e7e67a6456bc4f6648 (diff)
parenta89d684ba2b81c6e18d348965dffb919edb56fea (diff)
downloaduhd-830ce3f8dfc0fcc29c4ad2165bab7a994a3082da.tar.gz
uhd-830ce3f8dfc0fcc29c4ad2165bab7a994a3082da.tar.bz2
uhd-830ce3f8dfc0fcc29c4ad2165bab7a994a3082da.zip
Merge branch 'master' of ettus.sourcerepo.com:ettus/uhdpriv into usrp_e
-rw-r--r--host/lib/usrp/usrp2/usrp2_impl.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/host/lib/usrp/usrp2/usrp2_impl.cpp b/host/lib/usrp/usrp2/usrp2_impl.cpp
index 58f0696b5..0837f4ac4 100644
--- a/host/lib/usrp/usrp2/usrp2_impl.cpp
+++ b/host/lib/usrp/usrp2/usrp2_impl.cpp
@@ -44,6 +44,9 @@ UHD_STATIC_BLOCK(register_usrp2_device){
uhd::device_addrs_t usrp2::find(const device_addr_t &hint){
device_addrs_t usrp2_addrs;
+ //return an empty list of addresses when type is set to non-usrp2
+ if (hint.has_key("type") and hint["type"] != "usrp2") return usrp2_addrs;
+
//if no address was specified, send a broadcast on each interface
if (not hint.has_key("addr")){
BOOST_FOREACH(const if_addrs_t &if_addrs, get_if_addrs()){
@@ -88,7 +91,7 @@ uhd::device_addrs_t usrp2::find(const device_addr_t &hint){
//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["name"] = "USRP2";
+ new_addr["type"] = "usrp2";
new_addr["addr"] = ip_addr.to_string();
usrp2_addrs.push_back(new_addr);
//dont break here, it will exit the while loop