From 49ad7590728880f967dbc31876679a9dbd10d014 Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Mon, 3 Sep 2018 16:46:34 +0200 Subject: lms: Return error on device read timeout If LImeSDR device is unplugged or its fw crashes during operation, reading from the device will fail and will first receive short reads and finally 0 byte reads. Let's quickly notify these events to upper layers instead of trying to process the buffer and checking timestamps for something we know it's already not useful. Related: OS#3340 Change-Id: Ib1af8cdd6cdadf581b039882add4049eea45a0f7 --- Transceiver52M/device/lms/LMSDevice.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'Transceiver52M/device') diff --git a/Transceiver52M/device/lms/LMSDevice.cpp b/Transceiver52M/device/lms/LMSDevice.cpp index 881cfb7..d8220ea 100644 --- a/Transceiver52M/device/lms/LMSDevice.cpp +++ b/Transceiver52M/device/lms/LMSDevice.cpp @@ -511,11 +511,13 @@ int LMSDevice::readSamples(std::vector < short *>&bufs, int len, bool * overrun, for (i = 0; i