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:
- 258:62d6bf03e6a4
- Parent:
- 257:6e0ae0f1697b
- Child:
- 264:5533ac0adf4b
--- a/btle/btle_discovery.cpp Fri Jun 19 15:55:23 2015 +0100
+++ b/btle/btle_discovery.cpp Fri Jun 19 15:55:23 2015 +0100
@@ -154,7 +154,9 @@
.start_handle = startHandle,
.end_handle = endHandle
};
- printf("char discovery returned %u\r\n", sd_ble_gattc_characteristics_discover(connHandle, &handleRange));
+ if (sd_ble_gattc_characteristics_discover(connHandle, &handleRange) != NRF_SUCCESS) {
+ terminateCharacteristicDiscovery();
+ }
} else {
terminateCharacteristicDiscovery();
}
@@ -179,7 +181,9 @@
Gap::Handle_t endHandle = services[serviceIndex - 1].endHandle;
resetDiscoveredServices();
- printf("services discover returned %u\r\n", sd_ble_gattc_primary_services_discover(connHandle, endHandle, NULL));
+ if (sd_ble_gattc_primary_services_discover(connHandle, endHandle, NULL) != NRF_SUCCESS) {
+ terminateServiceDiscovery();
+ }
}
}
