diff options
author | Martin Braun <martin.braun@ettus.com> | 2017-06-12 10:32:42 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2017-12-22 15:03:59 -0800 |
commit | db52a26d3accadb9f170cb3b2098956186e80069 (patch) | |
tree | e5eda0a17259e6f08ace4f47d229120b887f33c3 /host/lib/usrp/mpmd | |
parent | 37220c4c20b4935fbbe47f75a8357e01873bf4b8 (diff) | |
download | uhd-db52a26d3accadb9f170cb3b2098956186e80069.tar.gz uhd-db52a26d3accadb9f170cb3b2098956186e80069.tar.bz2 uhd-db52a26d3accadb9f170cb3b2098956186e80069.zip |
mpm: Increased find timeout
Diffstat (limited to 'host/lib/usrp/mpmd')
-rw-r--r-- | host/lib/usrp/mpmd/mpmd_impl.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/host/lib/usrp/mpmd/mpmd_impl.cpp b/host/lib/usrp/mpmd/mpmd_impl.cpp index 23a90976c..ec48138a6 100644 --- a/host/lib/usrp/mpmd/mpmd_impl.cpp +++ b/host/lib/usrp/mpmd/mpmd_impl.cpp @@ -42,6 +42,8 @@ namespace { * Local constants ************************************************************************/ const size_t MPMD_CROSSBAR_MAX_LADDR = 255; + //! How long we wait for discovery responses (in seconds) + const double MPMD_FIND_TIMEOUT = 0.5; /************************************************************************* * Helper functions @@ -401,7 +403,10 @@ device_addrs_t mpmd_find_with_addr(const device_addr_t& hint_) device_addrs_t addrs; while (true) { char buff[4096] = {}; - const size_t nbytes = comm->recv(boost::asio::buffer(buff), 0.050); + const size_t nbytes = comm->recv( // TODO make sure we don't buf overflow + boost::asio::buffer(buff), + MPMD_FIND_TIMEOUT + ); if (nbytes == 0) { break; } |