summaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp2
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-11-11 12:23:33 -0800
committerJosh Blum <josh@joshknows.com>2010-11-11 12:23:33 -0800
commit314efb09459582b39ea2985bd8f9beba703076e4 (patch)
tree2aac00f561ab5a53e7171f79d185f5a01a92d1fc /host/lib/usrp/usrp2
parente0d84e8c8b4f0bb9fec22b48b7c61b9ca3eb8dbd (diff)
downloaduhd-314efb09459582b39ea2985bd8f9beba703076e4.tar.gz
uhd-314efb09459582b39ea2985bd8f9beba703076e4.tar.bz2
uhd-314efb09459582b39ea2985bd8f9beba703076e4.zip
usrp2: switch the timeout to units of seconds
Diffstat (limited to 'host/lib/usrp/usrp2')
-rw-r--r--host/lib/usrp/usrp2/usrp2_iface.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/host/lib/usrp/usrp2/usrp2_iface.cpp b/host/lib/usrp/usrp2/usrp2_iface.cpp
index 09f3432d6..f237d6377 100644
--- a/host/lib/usrp/usrp2/usrp2_iface.cpp
+++ b/host/lib/usrp/usrp2/usrp2_iface.cpp
@@ -41,7 +41,7 @@ using namespace uhd::transport;
* This will be fixed when host-based flow control is implemented,
* along with larger incoming send buffers using the on-board SRAM.
*/
-static const size_t CONTROL_TIMEOUT_MS = 3000; //3 seconds
+static const double CONTROL_TIMEOUT = 3.0; //seconds
class usrp2_iface_impl : public usrp2_iface{
public:
@@ -190,7 +190,7 @@ public:
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 = _ctrl_transport->recv(boost::asio::buffer(usrp2_ctrl_data_in_mem), CONTROL_TIMEOUT_MS);
+ size_t len = _ctrl_transport->recv(boost::asio::buffer(usrp2_ctrl_data_in_mem), CONTROL_TIMEOUT);
if(len >= sizeof(boost::uint32_t) and ntohl(ctrl_data_in->proto_ver) != USRP2_FW_COMPAT_NUM){
throw std::runtime_error(str(boost::format(
"Expected protocol compatibility number %d, but got %d:\n"