diff options
Diffstat (limited to 'usrp')
-rw-r--r-- | usrp/host/lib/legacy/usrp_basic.cc | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/usrp/host/lib/legacy/usrp_basic.cc b/usrp/host/lib/legacy/usrp_basic.cc index 0ac9e052a..dd1945878 100644 --- a/usrp/host/lib/legacy/usrp_basic.cc +++ b/usrp/host/lib/legacy/usrp_basic.cc @@ -541,17 +541,19 @@ usrp_basic_rx::stop () { bool ok = usrp_basic::stop(); - if (!d_ephandle->stop()){ - fprintf (stderr, "usrp_basic_rx: failed to stop end point streaming"); + if (!set_rx_enable(false)){ + fprintf (stderr, "usrp_basic_rx: set_rx_enable(false) failed\n"); usb_strerror (); ok = false; } - if (!set_rx_enable(false)){ - fprintf (stderr, "usrp_basic_rx: set_rx_enable(false) failed\n"); + + if (!d_ephandle->stop()){ + fprintf (stderr, "usrp_basic_rx: failed to stop end point streaming"); usb_strerror (); ok = false; } - return false; + + return ok; } usrp_basic_rx * @@ -970,16 +972,18 @@ usrp_basic_tx::stop () { bool ok = usrp_basic::stop (); - if (!set_tx_enable (false)){ - fprintf (stderr, "usrp_basic_tx: set_tx_enable(false) failed\n"); + if (!d_ephandle->stop ()){ + fprintf (stderr, "usrp_basic_tx: failed to stop end point streaming"); usb_strerror (); ok = false; } - if (!d_ephandle->stop ()){ - fprintf (stderr, "usrp_basic_tx: failed to stop end point streaming"); + + if (!set_tx_enable (false)){ + fprintf (stderr, "usrp_basic_tx: set_tx_enable(false) failed\n"); usb_strerror (); ok = false; } + return ok; } |