summaryrefslogtreecommitdiff
path: root/gr-usrp2/src/usrp2_source_16sc.cc
diff options
context:
space:
mode:
authoreb2008-09-24 00:20:41 +0000
committereb2008-09-24 00:20:41 +0000
commita28feaa487290195201ac6767b51a61b05066d40 (patch)
tree0b42ed5e1627b51ad0f514801aec1aa7fb8ba769 /gr-usrp2/src/usrp2_source_16sc.cc
parent8979083cd32897b7fc258d071b17d19fae0cc9d1 (diff)
downloadgnuradio-a28feaa487290195201ac6767b51a61b05066d40.tar.gz
gnuradio-a28feaa487290195201ac6767b51a61b05066d40.tar.bz2
gnuradio-a28feaa487290195201ac6767b51a61b05066d40.zip
return -1 (DONE flag) if source or sink sees an error
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@9650 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gr-usrp2/src/usrp2_source_16sc.cc')
-rw-r--r--gr-usrp2/src/usrp2_source_16sc.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/gr-usrp2/src/usrp2_source_16sc.cc b/gr-usrp2/src/usrp2_source_16sc.cc
index b12a6eece..1ff32a56e 100644
--- a/gr-usrp2/src/usrp2_source_16sc.cc
+++ b/gr-usrp2/src/usrp2_source_16sc.cc
@@ -59,8 +59,10 @@ usrp2_source_16sc::work(int noutput_items,
rx_16sc_handler::sptr handler = rx_16sc_handler::make(noutput_items, USRP2_MIN_RX_SAMPLES, out);
bool ok = d_u2->rx_samples(0, handler.get());
- if (!ok)
+ if (!ok){
std::cerr << "usrp2::rx_samples() failed" << std::endl;
+ return -1; // say we're done
+ }
return handler->nsamples();
}