aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp2
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/usrp/usrp2')
-rw-r--r--host/lib/usrp/usrp2/usrp2_impl.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/host/lib/usrp/usrp2/usrp2_impl.cpp b/host/lib/usrp/usrp2/usrp2_impl.cpp
index 22b7e109f..e1371a094 100644
--- a/host/lib/usrp/usrp2/usrp2_impl.cpp
+++ b/host/lib/usrp/usrp2/usrp2_impl.cpp
@@ -26,7 +26,7 @@ using namespace uhd::usrp;
using namespace uhd::transport;
namespace asio = boost::asio;
-STATIC_BLOCK(register_device){
+STATIC_BLOCK(register_usrp2_device){
device::register_device(&usrp2::discover, &usrp2::make);
}
@@ -36,6 +36,8 @@ STATIC_BLOCK(register_device){
uhd::device_addrs_t usrp2::discover(const device_addr_t &hint){
device_addrs_t usrp2_addrs;
+ if (not hint.has_key("addr")) return usrp2_addrs;
+
//create a udp transport to communicate
//TODO if an addr is not provided, search all interfaces?
std::string ctrl_port = boost::lexical_cast<std::string>(USRP2_UDP_CTRL_PORT);