diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-06-26 03:00:50 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-06-26 03:00:50 +0200 |
commit | 1c76ffaf2cc77162ce8ee23d4604dc9925bef201 (patch) | |
tree | 562aa9858361c84a6758b857cffcc3c26b28020b /src/bluetooth/osx/osxbtcentralmanager.mm | |
parent | 3e1c520f039484a9ecc5d6aacea5d761a183dc47 (diff) | |
parent | c754e16ceddaf6826d2a74775df8409b3278d5b8 (diff) |
Merge remote-tracking branch 'origin/5.11' into dev
Change-Id: I68aa4ba1a2019bb0240f95df6abab7f474677757
Diffstat (limited to 'src/bluetooth/osx/osxbtcentralmanager.mm')
-rw-r--r-- | src/bluetooth/osx/osxbtcentralmanager.mm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/bluetooth/osx/osxbtcentralmanager.mm b/src/bluetooth/osx/osxbtcentralmanager.mm index b56dc0d5..9254bd98 100644 --- a/src/bluetooth/osx/osxbtcentralmanager.mm +++ b/src/bluetooth/osx/osxbtcentralmanager.mm @@ -229,6 +229,9 @@ QT_END_NAMESPACE qCWarning(QT_BT_OSX, "Timeout while reading a descriptor"); [self peripheral:peripheral didUpdateValueForDescriptor:objectUnderWatch error:nsError]; break; + case OperationTimeout::characteristicWrite: + qCWarning(QT_BT_OSX, "Timeout while writing a characteristic with response"); + [self peripheral:peripheral didWriteValueForCharacteristic:objectUnderWatch error:nsError]; default:; } } @@ -751,6 +754,7 @@ QT_END_NAMESPACE return [self performNextRequest]; requestPending = true; + [self watchAfter:characteristic timeout:OperationTimeout::characteristicWrite]; [peripheral writeValue:data.data() forCharacteristic:characteristic type:CBCharacteristicWriteWithResponse]; } else { @@ -1621,6 +1625,10 @@ QT_END_NAMESPACE QT_BT_MAC_AUTORELEASEPOOL; + if (characteristic != objectUnderWatch) + return; + + [self stopWatchdog]; requestPending = false; |