test

Dependencies:   nrf51-sdk

Dependents:   microbit-dal

Fork of nRF51822 by Lancaster University

Revision:
272:c918f8a73f3f
Parent:
264:5533ac0adf4b
Child:
273:8ada9e8111a3
--- a/btle/btle_discovery.cpp	Fri Jun 19 15:55:25 2015 +0100
+++ b/btle/btle_discovery.cpp	Fri Jun 19 15:55:25 2015 +0100
@@ -171,7 +171,7 @@
             serviceCallback(services[serviceIndex]);
         }
 
-        if (characteristicCallback) { /* characteristic discovery is optional. */
+        if (sDiscoveryActive && characteristicCallback) { /* characteristic discovery is optional. */
             launchCharacteristicDiscovery(connHandle, services[serviceIndex].getStartHandle(), services[serviceIndex].getEndHandle());
         } else {
             serviceIndex++; /* Progress service index to keep discovery alive. */