From: eb Date: Wed, 30 May 2007 19:19:35 +0000 (+0000) Subject: Dave Gotwisner's fix for usrp_basic_rx::stop X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=e60ca726639d6588b243241d38d28a094404dbb7;p=debian%2Fgnuradio Dave Gotwisner's fix for usrp_basic_rx::stop git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@5576 221aa14e-8319-0410-a670-987f0aec2ac5 --- diff --git a/usrp/host/lib/legacy/usrp_basic.cc b/usrp/host/lib/legacy/usrp_basic.cc index 0ac9e052..dd194587 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; }