diff options
author | DaulPavid <paul.david@ettus.com> | 2016-03-03 12:37:18 -0800 |
---|---|---|
committer | DaulPavid <paul.david@ettus.com> | 2016-03-03 12:37:18 -0800 |
commit | a9de87e33dc75bea0c7f3e814fbb1616029ac8c8 (patch) | |
tree | 7fd65b930ee2410d1a1239ba9ff85a93efff4e1b /host | |
parent | 1e803ff6ac2ac86acaeb4d4b560846b0aa85fce2 (diff) | |
download | uhd-a9de87e33dc75bea0c7f3e814fbb1616029ac8c8.tar.gz uhd-a9de87e33dc75bea0c7f3e814fbb1616029ac8c8.tar.bz2 uhd-a9de87e33dc75bea0c7f3e814fbb1616029ac8c8.zip |
examples: TX/RX loopback could run forever if the exact number of samples isn't received
Diffstat (limited to 'host')
-rw-r--r-- | host/examples/txrx_loopback_to_file.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/host/examples/txrx_loopback_to_file.cpp b/host/examples/txrx_loopback_to_file.cpp index 7dc3bd9c2..0ce7ac52a 100644 --- a/host/examples/txrx_loopback_to_file.cpp +++ b/host/examples/txrx_loopback_to_file.cpp @@ -149,7 +149,7 @@ template<typename samp_type> void recv_to_file( stream_cmd.time_spec = uhd::time_spec_t(settling_time); rx_stream->issue_stream_cmd(stream_cmd); - while(not stop_signal_called and (num_requested_samples != num_total_samps or num_requested_samples == 0)){ + while(not stop_signal_called and (num_requested_samples < num_total_samps or num_requested_samples == 0)){ size_t num_rx_samps = rx_stream->recv(buff_ptrs, samps_per_buff, md, timeout); timeout = 0.1f; //small timeout for subsequent recv |