]> git.gag.com Git - debian/gnuradio/commitdiff
Dave Gotwisner's fix for usrp_basic_rx::stop
authoreb <eb@221aa14e-8319-0410-a670-987f0aec2ac5>
Wed, 30 May 2007 19:19:35 +0000 (19:19 +0000)
committereb <eb@221aa14e-8319-0410-a670-987f0aec2ac5>
Wed, 30 May 2007 19:19:35 +0000 (19:19 +0000)
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@5576 221aa14e-8319-0410-a670-987f0aec2ac5

usrp/host/lib/legacy/usrp_basic.cc

index 0ac9e052a14efc0e8b41033a82bfb41d071267dd..dd194587826f0b1f59fc4c9c83e0a095a7c37dc3 100644 (file)
@@ -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;
 }