This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
pespin gerrit-no-reply at lists.osmocom.orgpespin has submitted this change and it was merged. ( https://gerrit.osmocom.org/c/osmo-trx/+/15523 )
Change subject: radioInterface{Multi,Resamp}: Fix successful writeSamples() masking underrun from readSamples()
......................................................................
radioInterface{Multi,Resamp}: Fix successful writeSamples() masking underrun from readSamples()
The only who should be setting class instance value "underrun" to false
is isUnderrun().
Similar fixes were already applied lately to radioInterface.cpp.
Change-Id: I3239b1df4536c080365106b3e4daa523b57f5dff
---
M Transceiver52M/radioInterfaceMulti.cpp
M Transceiver52M/radioInterfaceResamp.cpp
2 files changed, 6 insertions(+), 2 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, but someone else must approve
fixeria: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
diff --git a/Transceiver52M/radioInterfaceMulti.cpp b/Transceiver52M/radioInterfaceMulti.cpp
index 4022d3a..99f6231 100644
--- a/Transceiver52M/radioInterfaceMulti.cpp
+++ b/Transceiver52M/radioInterfaceMulti.cpp
@@ -309,6 +309,7 @@
/* Send a timestamped chunk to the device */
bool RadioInterfaceMulti::pushBuffer()
{
+ bool local_underrun;
if (sendBuffer[0]->getAvailSegments() <= 0)
return false;
@@ -341,12 +342,13 @@
size_t num = mDevice->writeSamples(convertSendBuffer,
outerSendBuffer->size(),
- &underrun,
+ &local_underrun,
writeTimestamp);
if (num != outerSendBuffer->size()) {
LOG(ALERT) << "Transmit error " << num;
}
+ underrun |= local_underrun;
writeTimestamp += num;
return true;
diff --git a/Transceiver52M/radioInterfaceResamp.cpp b/Transceiver52M/radioInterfaceResamp.cpp
index d6dc52c..864cdee 100644
--- a/Transceiver52M/radioInterfaceResamp.cpp
+++ b/Transceiver52M/radioInterfaceResamp.cpp
@@ -204,6 +204,7 @@
/* Send a timestamped chunk to the device */
bool RadioInterfaceResamp::pushBuffer()
{
+ bool local_underrun;
int rc;
size_t numSent;
@@ -225,12 +226,13 @@
numSent = mDevice->writeSamples(convertSendBuffer,
resamp_outchunk,
- &underrun,
+ &local_underrun,
writeTimestamp);
if (numSent != resamp_outchunk) {
LOG(ALERT) << "Transmit error " << numSent;
}
+ underrun |= local_underrun;
writeTimestamp += resamp_outchunk;
return true;
--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/15523
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I3239b1df4536c080365106b3e4daa523b57f5dff
Gerrit-Change-Number: 15523
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: laforge <laforge at gnumonks.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190918/6a4f2465/attachment.htm>