From 866ca76a585f877b2f87ddd1998c1b67a1db19c6 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Wed, 17 Apr 2019 09:08:10 -0700 Subject: 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 --- core/qt-ble.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core') diff --git a/core/qt-ble.cpp b/core/qt-ble.cpp index 1cbd57266..863b1804c 100644 --- a/core/qt-ble.cpp +++ b/core/qt-ble.cpp @@ -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(); -- cgit v1.2.3-70-g09d2