diff options
author | Timur Pocheptsov <timur.pocheptsov@theqtcompany.com> | 2016-10-05 16:00:32 +0200 |
---|---|---|
committer | Timur Pocheptsov <timur.pocheptsov@theqtcompany.com> | 2016-11-01 08:02:52 +0000 |
commit | b6bf84ed241a74d796a435163019c6a1c5af12af (patch) | |
tree | 09bb1ea7bc8eb7f2ee3172e93797daf38a39a6b0 | |
parent | 052e7ce371d4719df778ad8b378bcf1af14d294b (diff) |
BTLE device discovery - fix incorrect comparisons (iOS/macOS)
'state' is an instance variable (the type is LEInquiryState), that holds the
previous inquiry state, while testing manager's state, we must use a local
variable 'cbState' (CBCentralManagerState) instead.
Change-Id: Ie1c4dbdb4fae571c94d7565a8de78657e252de7b
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
-rw-r--r-- | src/bluetooth/osx/osxbtledeviceinquiry.mm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bluetooth/osx/osxbtledeviceinquiry.mm b/src/bluetooth/osx/osxbtledeviceinquiry.mm index df4dab69..4610ab88 100644 --- a/src/bluetooth/osx/osxbtledeviceinquiry.mm +++ b/src/bluetooth/osx/osxbtledeviceinquiry.mm @@ -220,9 +220,9 @@ QT_USE_NAMESPACE [manager scanForPeripheralsWithServices:nil options:nil]; } // Else we ignore. #if QT_IOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__IPHONE_10_0) - } else if (state == CBManagerStateUnsupported || state == CBManagerStateUnauthorized) { + } else if (cbState == CBManagerStateUnsupported || cbState == CBManagerStateUnauthorized) { #else - } else if (state == CBCentralManagerStateUnsupported || state == CBCentralManagerStateUnauthorized) { + } else if (cbState == CBCentralManagerStateUnsupported || cbState == CBCentralManagerStateUnauthorized) { #endif if (internalState == InquiryActive) { [manager stopScan]; |