From 744e60bd598df4677a88df10d1fceb56e7c1ee36 Mon Sep 17 00:00:00 2001 From: michael-west Date: Fri, 4 Dec 2020 13:50:54 -0800 Subject: RFNoC: Handle receive of 0 samples Returns immediately if requested number of samples is zero. Prevents timeout error from being thrown if user requests no samples. Signed-off-by: michael-west --- host/lib/include/uhdlib/transport/rx_streamer_impl.hpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'host/lib/include/uhdlib/transport/rx_streamer_impl.hpp') diff --git a/host/lib/include/uhdlib/transport/rx_streamer_impl.hpp b/host/lib/include/uhdlib/transport/rx_streamer_impl.hpp index ce66d2ccb..087a13de7 100644 --- a/host/lib/include/uhdlib/transport/rx_streamer_impl.hpp +++ b/host/lib/include/uhdlib/transport/rx_streamer_impl.hpp @@ -132,6 +132,11 @@ public: const double timeout, const bool one_packet) { + if (nsamps_per_buff == 0) { + metadata.reset(); + return 0; + } + if (_error_metadata_cache.check(metadata)) { return 0; } -- cgit v1.2.3