X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=usrp%2Fhost%2Flib%2Fusrp_basic.cc;h=8bb4a191ef1bbd660b441061ce556ec340260199;hb=09a1e803a9e6587c78d20cdf16891e5295874668;hp=2eef14727701fd6905df67e1b4ee406d1ebb56d8;hpb=b78ae1de4d9bbde942e5e7556630d7ccd8161c30;p=debian%2Fgnuradio diff --git a/usrp/host/lib/usrp_basic.cc b/usrp/host/lib/usrp_basic.cc index 2eef1472..8bb4a191 100644 --- a/usrp/host/lib/usrp_basic.cc +++ b/usrp/host/lib/usrp_basic.cc @@ -6,7 +6,7 @@ * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) + * the Free Software Foundation; either version 3, or (at your option) * any later version. * * GNU Radio is distributed in the hope that it will be useful, @@ -475,7 +475,7 @@ usrp_basic_rx::usrp_basic_rx (int which_board, int fusb_block_size, int fusb_nbl throw std::out_of_range ("usrp_basic_rx: invalid fusb_nblocks"); if (fusb_block_size == 0) - fusb_block_size = FUSB_BLOCK_SIZE; + fusb_block_size = fusb_sysconfig::default_block_size(); if (fusb_nblocks == 0) fusb_nblocks = std::max (1, FUSB_BUFFER_SIZE / fusb_block_size); @@ -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; }