aa
Dependents: Peripheral_1_serial_copy Peripheral_1_serial 151006_1st_Scenario_normal
Fork of nRF51822 by
Diff: btle/btle_discovery.cpp
- Revision:
- 281:2280bb1a9a9e
- Parent:
- 280:cbaa4cb83548
- Child:
- 282:6633922380bf
diff -r cbaa4cb83548 -r 2280bb1a9a9e btle/btle_discovery.cpp --- 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 @@ -30,6 +30,10 @@ const UUID &matchingServiceUUIDIn, const UUID &matchingCharacteristicUUIDIn) { + if (isActive()) { + return BLE_ERROR_INVALID_STATE; + } + sdSingleton.serviceCallback = sc; sdSingleton.characteristicCallback = cc; sdSingleton.matchingServiceUUID = matchingServiceUUIDIn;