diff options
author | Josh Blum <josh@joshknows.com> | 2010-10-11 18:21:16 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-10-11 18:21:16 -0700 |
commit | d54fd2abffd8849bf41a5f8084a828e6472ba342 (patch) | |
tree | 29a717e09bc0bbec06b6ac4a8a452c9916338184 /host/lib/usrp/usrp2/usrp2_impl.cpp | |
parent | 1314feb429b8c2713d9fd0e9da077825d0a9c3bc (diff) | |
download | uhd-d54fd2abffd8849bf41a5f8084a828e6472ba342.tar.gz uhd-d54fd2abffd8849bf41a5f8084a828e6472ba342.tar.bz2 uhd-d54fd2abffd8849bf41a5f8084a828e6472ba342.zip |
usrp2: use select rather than manually polling the simple udp socket
Diffstat (limited to 'host/lib/usrp/usrp2/usrp2_impl.cpp')
-rw-r--r-- | host/lib/usrp/usrp2/usrp2_impl.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/host/lib/usrp/usrp2/usrp2_impl.cpp b/host/lib/usrp/usrp2/usrp2_impl.cpp index 79bf2b260..1d9f25019 100644 --- a/host/lib/usrp/usrp2/usrp2_impl.cpp +++ b/host/lib/usrp/usrp2/usrp2_impl.cpp @@ -35,9 +35,6 @@ using namespace uhd::usrp; using namespace uhd::transport; namespace asio = boost::asio; -//! wait this long for a control response when discovering devices -static const size_t DISCOVERY_TIMEOUT_MS = 100; - /*********************************************************************** * Helper Functions **********************************************************************/ @@ -99,7 +96,7 @@ static uhd::device_addrs_t usrp2_find(const device_addr_t &hint){ boost::uint8_t usrp2_ctrl_data_in_mem[udp_simple::mtu]; //allocate max bytes for recv const usrp2_ctrl_data_t *ctrl_data_in = reinterpret_cast<const usrp2_ctrl_data_t *>(usrp2_ctrl_data_in_mem); while(true){ - size_t len = udp_transport->recv(asio::buffer(usrp2_ctrl_data_in_mem), DISCOVERY_TIMEOUT_MS); + size_t len = udp_transport->recv(asio::buffer(usrp2_ctrl_data_in_mem)); //std::cout << len << "\n"; if (len > offsetof(usrp2_ctrl_data_t, data)){ //handle the received data |