nordic

Fork of nRF51822 by Nordic Semiconductor

Revision:
322:3ece9d123429
Parent:
321:b1281aaf0076
Child:
323:788b6ac328b7
diff -r b1281aaf0076 -r 3ece9d123429 btle/btle_discovery.cpp
--- a/btle/btle_discovery.cpp	Fri Jun 19 15:55:31 2015 +0100
+++ b/btle/btle_discovery.cpp	Fri Jun 19 15:55:31 2015 +0100
@@ -273,7 +273,8 @@
     /* Iterate through the previously discovered characteristics cached in characteristics[]. */
     while ((state == CHARACTERISTIC_DISCOVERY_ACTIVE) && (characteristicIndex < numCharacteristics)) {
         if ((matchingCharacteristicUUID == UUID::ShortUUIDBytes_t(BLE_UUID_UNKNOWN)) ||
-            (matchingCharacteristicUUID == characteristics[characteristicIndex].getShortUUID())) {
+            ((matchingCharacteristicUUID == characteristics[characteristicIndex].getShortUUID()) &&
+             (matchingServiceUUID != UUID::ShortUUIDBytes_t(BLE_UUID_UNKNOWN)))) {
             if (characteristicCallback) {
                 characteristicCallback(&characteristics[characteristicIndex]);
             }