diff options
author | Josh Blum <josh@joshknows.com> | 2013-08-15 15:21:51 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2013-08-15 15:21:51 -0700 |
commit | be267e7250108d1e66bb75db21599e635cf8ebb7 (patch) | |
tree | 1482f946b6b2de74cf0f19e838d7c3cc9c4504e2 /host/lib/usrp/usrp2 | |
parent | 95e6bfeaac7783fcb31e5c7a05e6d662844b6fd3 (diff) | |
parent | 8eaa2dd2b44600899d406e3a635c123d3ea451c2 (diff) | |
download | uhd-be267e7250108d1e66bb75db21599e635cf8ebb7.tar.gz uhd-be267e7250108d1e66bb75db21599e635cf8ebb7.tar.bz2 uhd-be267e7250108d1e66bb75db21599e635cf8ebb7.zip |
Merge branch 'maint'
Diffstat (limited to 'host/lib/usrp/usrp2')
-rw-r--r-- | host/lib/usrp/usrp2/usrp2_impl.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/host/lib/usrp/usrp2/usrp2_impl.cpp b/host/lib/usrp/usrp2/usrp2_impl.cpp index 21f166aa1..3afb3aac7 100644 --- a/host/lib/usrp/usrp2/usrp2_impl.cpp +++ b/host/lib/usrp/usrp2/usrp2_impl.cpp @@ -103,7 +103,18 @@ static device_addrs_t usrp2_find(const device_addr_t &hint_){ usrp2_ctrl_data_t ctrl_data_out = usrp2_ctrl_data_t(); ctrl_data_out.proto_ver = uhd::htonx<boost::uint32_t>(USRP2_FW_COMPAT_NUM); ctrl_data_out.id = uhd::htonx<boost::uint32_t>(USRP2_CTRL_ID_WAZZUP_BRO); - udp_transport->send(boost::asio::buffer(&ctrl_data_out, sizeof(ctrl_data_out))); + try + { + udp_transport->send(boost::asio::buffer(&ctrl_data_out, sizeof(ctrl_data_out))); + } + catch(const std::exception &ex) + { + UHD_MSG(error) << "USRP2 Network discovery error " << ex.what() << std::endl; + } + catch(...) + { + UHD_MSG(error) << "USRP2 Network discovery unknown error " << std::endl; + } //loop and recieve until the timeout boost::uint8_t usrp2_ctrl_data_in_mem[udp_simple::mtu]; //allocate max bytes for recv |