aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/mpmd/mpmd_mboard_impl.cpp
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2018-01-08 18:53:23 -0800
committerMartin Braun <martin.braun@ettus.com>2018-01-10 12:25:13 -0800
commitdda907acf1f06b616c7272d548f9dc66f28d01ea (patch)
tree5bdd2a18da6765d200319d985ec4db3758345f48 /host/lib/usrp/mpmd/mpmd_mboard_impl.cpp
parent02b407c92174717fd571ed7b1c85ebc0e5ac35c7 (diff)
downloaduhd-dda907acf1f06b616c7272d548f9dc66f28d01ea.tar.gz
uhd-dda907acf1f06b616c7272d548f9dc66f28d01ea.tar.bz2
uhd-dda907acf1f06b616c7272d548f9dc66f28d01ea.zip
mpmd: Poll logs on claim and exit
Diffstat (limited to 'host/lib/usrp/mpmd/mpmd_mboard_impl.cpp')
-rw-r--r--host/lib/usrp/mpmd/mpmd_mboard_impl.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/host/lib/usrp/mpmd/mpmd_mboard_impl.cpp b/host/lib/usrp/mpmd/mpmd_mboard_impl.cpp
index bd37e5ffb..bd792ce59 100644
--- a/host/lib/usrp/mpmd/mpmd_mboard_impl.cpp
+++ b/host/lib/usrp/mpmd/mpmd_mboard_impl.cpp
@@ -210,6 +210,11 @@ mpmd_mboard_impl::mpmd_mboard_impl(
mpmd_mboard_impl::~mpmd_mboard_impl()
{
+ try {
+ dump_logs();
+ } catch (...) {
+ UHD_LOG_WARNING("MPMD", "Could not flush log queue on exit!");
+ }
UHD_SAFE_CALL(
if (not rpc->request_with_token<bool>("unclaim")) {
UHD_LOG_WARNING("MPMD", "Failure to ack unclaim!");
@@ -355,6 +360,7 @@ uhd::task::sptr mpmd_mboard_impl::claim_device_and_make_task(
if (not this->claim()) {
throw uhd::value_error("mpmd device reclaiming loop failed!");
};
+ this->dump_logs();
std::this_thread::sleep_for(
std::chrono::milliseconds(MPMD_RECLAIM_INTERVAL_MS)
);