summaryrefslogtreecommitdiff
path: root/gr-usrp2/src
diff options
context:
space:
mode:
Diffstat (limited to 'gr-usrp2/src')
-rw-r--r--gr-usrp2/src/usrp2_sink_16sc.cc4
-rw-r--r--gr-usrp2/src/usrp2_sink_32fc.cc4
-rw-r--r--gr-usrp2/src/usrp2_source_16sc.cc4
-rw-r--r--gr-usrp2/src/usrp2_source_32fc.cc4
4 files changed, 12 insertions, 4 deletions
diff --git a/gr-usrp2/src/usrp2_sink_16sc.cc b/gr-usrp2/src/usrp2_sink_16sc.cc
index bbd85563c..f1356bb42 100644
--- a/gr-usrp2/src/usrp2_sink_16sc.cc
+++ b/gr-usrp2/src/usrp2_sink_16sc.cc
@@ -64,8 +64,10 @@ usrp2_sink_16sc::work(int noutput_items,
bool ok = d_u2->tx_16sc(0, // FIXME: someday, streams will have channel numbers
in, noutput_items, &metadata);
- if (!ok)
+ if (!ok){
std::cerr << "usrp2_sink_16sc: tx_complex_int16 failed" << std::endl;
+ return -1; // say we're done
+ }
return noutput_items;
}
diff --git a/gr-usrp2/src/usrp2_sink_32fc.cc b/gr-usrp2/src/usrp2_sink_32fc.cc
index fbb56e707..f630c964b 100644
--- a/gr-usrp2/src/usrp2_sink_32fc.cc
+++ b/gr-usrp2/src/usrp2_sink_32fc.cc
@@ -64,8 +64,10 @@ usrp2_sink_32fc::work(int noutput_items,
bool ok = d_u2->tx_32fc(0, // FIXME: someday, streams will have channel numbers
in, noutput_items, &metadata);
- if (!ok)
+ if (!ok){
std::cerr << "usrp2_sink_32fc: tx_32fc failed" << std::endl;
+ return -1; // say we're done
+ }
return noutput_items;
}
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();
}
diff --git a/gr-usrp2/src/usrp2_source_32fc.cc b/gr-usrp2/src/usrp2_source_32fc.cc
index 0d2418518..5726f2279 100644
--- a/gr-usrp2/src/usrp2_source_32fc.cc
+++ b/gr-usrp2/src/usrp2_source_32fc.cc
@@ -59,8 +59,10 @@ usrp2_source_32fc::work(int noutput_items,
rx_32fc_handler::sptr handler = rx_32fc_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();
}