aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp2/usrp2_impl.cpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-03-22 17:52:08 -0700
committerJosh Blum <josh@joshknows.com>2010-03-22 17:52:08 -0700
commit694dc3c7bc6f07b9660aef0c5ace9f6e11f98066 (patch)
tree6e0f0d4aab4b82bc39260fe65936787042ed4126 /host/lib/usrp/usrp2/usrp2_impl.cpp
parent767bb419200aa80f90a8845e92c989215919f3a7 (diff)
downloaduhd-694dc3c7bc6f07b9660aef0c5ace9f6e11f98066.tar.gz
uhd-694dc3c7bc6f07b9660aef0c5ace9f6e11f98066.tar.bz2
uhd-694dc3c7bc6f07b9660aef0c5ace9f6e11f98066.zip
merged usrp2 stuff from u1e branch (without merging the u1e stuff)
Diffstat (limited to 'host/lib/usrp/usrp2/usrp2_impl.cpp')
-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 bdf8cc55b..85d73e83a 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);