radioInterface: forward errors from RadioDevice to Transceiver in recv path
Change-Id: Id7b08b19d6575c79b4d57db656a17ff05bb61ee9
diff --git a/Transceiver52M/radioInterfaceMulti.cpp b/Transceiver52M/radioInterfaceMulti.cpp
index b3add21..67ccb25 100644
--- a/Transceiver52M/radioInterfaceMulti.cpp
+++ b/Transceiver52M/radioInterfaceMulti.cpp
@@ -225,14 +225,14 @@
}
/* Receive a timestamped chunk from the device */
-void RadioInterfaceMulti::pullBuffer()
+int RadioInterfaceMulti::pullBuffer()
{
bool local_underrun;
size_t num;
float *buf;
if (recvBuffer[0]->getFreeSegments() <= 0)
- return;
+ return -1;
/* Outer buffer access size is fixed */
num = mRadio->readSamples(convertRecvBuffer,
@@ -242,7 +242,7 @@
&local_underrun);
if (num != channelizer->inputLen()) {
LOG(ALERT) << "Receive error " << num << ", " << channelizer->inputLen();
- return;
+ return -1;
}
convert_short_float((float *) outerRecvBuffer->begin(),
@@ -288,6 +288,7 @@
LOG(ALERT) << "Sample rate upsampling error";
}
}
+ return 0;
}
/* Send a timestamped chunk to the device */