summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org>2019-04-17 09:08:10 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-04-18 05:42:54 +1200
commit866ca76a585f877b2f87ddd1998c1b67a1db19c6 (patch)
treeb491b9e73c5bb91de1903a14a637606ab644d54c /core
parent52105e521720c87e64dbd2519be7bbe5dc243439 (diff)
downloadsubsurface-866ca76a585f877b2f87ddd1998c1b67a1db19c6.tar.gz
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>
Diffstat (limited to 'core')
-rw-r--r--core/qt-ble.cpp2
1 files changed, 1 insertions, 1 deletions
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();