aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp
diff options
context:
space:
mode:
authormichael-west <michael.west@ettus.com>2020-12-03 13:02:37 -0800
committermichael-west <michael.west@ettus.com>2020-12-10 16:16:02 -0800
commit1fa617045c7c3ffb345ea595e4ca040219df9fc8 (patch)
treec6be90975ac345b96a293f39686cb9e9de1535e4 /host/lib/usrp
parent71137999430afaca18bfff179e6a3c4b0276d54c (diff)
downloaduhd-1fa617045c7c3ffb345ea595e4ca040219df9fc8.tar.gz
uhd-1fa617045c7c3ffb345ea595e4ca040219df9fc8.tar.bz2
uhd-1fa617045c7c3ffb345ea595e4ca040219df9fc8.zip
RFNoC: Demoted zero sample error to warning
Requesting zero samples was resulting in an error and causing applications to crash. This was a change frome previous versions of UHD. Demoted to warning so applications continue as they did before. Signed-off-by: Michael West <michael.west@ettus.com>
Diffstat (limited to 'host/lib/usrp')
-rw-r--r--host/lib/usrp/cores/rx_vita_core_3000.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/host/lib/usrp/cores/rx_vita_core_3000.cpp b/host/lib/usrp/cores/rx_vita_core_3000.cpp
index 368ae8e0a..fb3305ce8 100644
--- a/host/lib/usrp/cores/rx_vita_core_3000.cpp
+++ b/host/lib/usrp/cores/rx_vita_core_3000.cpp
@@ -82,12 +82,18 @@ struct rx_vita_core_3000_impl : rx_vita_core_3000
// not setup yet!";
return;
}
- if ((stream_cmd.stream_mode == stream_cmd_t::STREAM_MODE_NUM_SAMPS_AND_DONE
+ if (stream_cmd.stream_mode == stream_cmd_t::STREAM_MODE_NUM_SAMPS_AND_DONE
|| stream_cmd.stream_mode == stream_cmd_t::STREAM_MODE_NUM_SAMPS_AND_MORE)
- && stream_cmd.num_samps > 0x0fffffff) {
- throw uhd::assertion_error(
- "Invalid stream command: num_samps exceeds maximum value! "
- "(Note: Chain multiple commands to request larger bursts)");
+ {
+ if (stream_cmd.num_samps == 0) {
+ UHD_LOGGER_WARNING("CORES") << "Ignoring stream command for finite acquisition of zero samples";
+ return;
+ }
+ if (stream_cmd.num_samps > 0x0fffffff) {
+ throw uhd::assertion_error(
+ "Invalid stream command: num_samps exceeds maximum value! "
+ "(Note: Chain multiple commands to request larger bursts)");
+ }
}
// setup the mode to instruction flags