aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp
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
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')
-rw-r--r--host/lib/usrp/usrp2/usrp2_impl.cpp4
-rw-r--r--host/lib/usrp/usrp2/usrp2_impl.hpp2
2 files changed, 3 insertions, 3 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);
diff --git a/host/lib/usrp/usrp2/usrp2_impl.hpp b/host/lib/usrp/usrp2/usrp2_impl.hpp
index 70420fd49..55ac0b192 100644
--- a/host/lib/usrp/usrp2/usrp2_impl.hpp
+++ b/host/lib/usrp/usrp2/usrp2_impl.hpp
@@ -86,8 +86,6 @@ private:
*/
class usrp2_impl : public uhd::device{
public:
- typedef boost::shared_ptr<usrp2_impl> sptr;
-
/*!
* Create a new usrp2 impl base.
* \param ctrl_transport the udp transport for control