Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: nrf51-sdk
Fork of nRF51822 by
Diff: btle/btle_discovery.cpp
- Revision:
- 284:29fb6af6671d
- Parent:
- 283:c4c2aeab86c3
- Child:
- 285:55ac765bcc8d
--- a/btle/btle_discovery.cpp Fri Jun 19 15:55:26 2015 +0100
+++ b/btle/btle_discovery.cpp Fri Jun 19 15:55:26 2015 +0100
@@ -210,8 +210,12 @@
Gap::Handle_t endHandle = services[serviceIndex - 1].getEndHandle();
resetDiscoveredServices(); /* Note: resetDiscoveredServices() must come after fetching endHandle. */
- if (sd_ble_gattc_primary_services_discover(connHandle, endHandle, NULL) != NRF_SUCCESS) {
+ if (endHandle == SRV_DISC_END_HANDLE) {
terminateServiceDiscovery();
+ } else {
+ if (sd_ble_gattc_primary_services_discover(connHandle, endHandle, NULL) != NRF_SUCCESS) {
+ terminateServiceDiscovery();
+ }
}
}
}
