From dfb30a5d35c4dfeac567c250b792e5d9a68e8a69 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Wed, 31 Aug 2011 15:51:23 -0700 Subject: usrp2: made iface deconstructor safe (unlock can throw) --- host/lib/usrp/usrp2/usrp2_iface.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'host/lib/usrp/usrp2/usrp2_iface.cpp') diff --git a/host/lib/usrp/usrp2/usrp2_iface.cpp b/host/lib/usrp/usrp2/usrp2_iface.cpp index aaa5acbd5..d91dd0e40 100644 --- a/host/lib/usrp/usrp2/usrp2_iface.cpp +++ b/host/lib/usrp/usrp2/usrp2_iface.cpp @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -96,9 +97,9 @@ public: mb_eeprom = mboard_eeprom_t(*this, mboard_eeprom_t::MAP_N100); } - ~usrp2_iface_impl(void){ + ~usrp2_iface_impl(void){UHD_SAFE_CALL( this->lock_device(false); - } + )} /*********************************************************************** * Device locking -- cgit v1.2.3