diff options
author | Denis Shienkov <denis.shienkov@gmail.com> | 2015-10-23 11:41:09 +0300 |
---|---|---|
committer | Denis Shienkov <denis.shienkov@gmail.com> | 2015-10-23 10:50:35 +0000 |
commit | 84dfae733088c771c3ddbdca7820d0a07a801abe (patch) | |
tree | 0e238e45117f1f18e73fbf4773194c7976fcde3f /src | |
parent | aee7e789db94960e1de16830c112ba09b5ab730e (diff) | |
download | qtconnectivity-84dfae733088c771c3ddbdca7820d0a07a801abe.tar.gz |
Add missed returns from the service details discovery function
In case of error we need to return from the function immediatelly.
Change-Id: Ic54431a8aed5beabd97ad85b122e64ecadf60c13
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/bluetooth/qlowenergycontroller_win.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/bluetooth/qlowenergycontroller_win.cpp b/src/bluetooth/qlowenergycontroller_win.cpp index cc0e7010..a8ef3005 100644 --- a/src/bluetooth/qlowenergycontroller_win.cpp +++ b/src/bluetooth/qlowenergycontroller_win.cpp @@ -467,6 +467,7 @@ void QLowEnergyControllerPrivate::discoverServiceDetails( << "path :" << qt_error_string(systemErrorCode); servicePrivate->setError(QLowEnergyService::UnknownError); servicePrivate->setState(QLowEnergyService::DiscoveryRequired); + return; } const HANDLE serviceHandle = openSystemDevice @@ -477,6 +478,7 @@ void QLowEnergyControllerPrivate::discoverServiceDetails( << ":" << qt_error_string(systemErrorCode); servicePrivate->setError(QLowEnergyService::UnknownError); servicePrivate->setState(QLowEnergyService::DiscoveryRequired); + return; } const QVector<BTH_LE_GATT_CHARACTERISTIC> foundCharacteristics = |