qt-ble: return DC_STATUS_TIMEOUT rather than DC_STATUS_IO on timeout

This didn't use to matter, because none of the BLE-using backends did
retry on timeout until recently.

But Jef started doing packet sending retry for the Mares Icon backend,
and now we should make sure to distinguish the "IO failed" from "IO
timed out" cases.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Linus Torvalds 2019-04-17 09:08:10 -07:00 committed by Dirk Hohndel
parent 52105e5217
commit 866ca76a58

View file

@ -211,7 +211,7 @@ dc_status_t BLEObject::read(void *data, size_t size, size_t *actual)
WAITFOR(!receivedPackets.isEmpty(), timeout);
if (receivedPackets.isEmpty())
return DC_STATUS_IO;
return DC_STATUS_TIMEOUT;
}
QByteArray packet = receivedPackets.takeFirst();