Update for latest nRF51822 code changes.
Dependencies: BLE_API nRF51822
Fork of Puck by
Diff: Puck.h
- Revision:
- 4:91506772210d
- Parent:
- 3:5432b38585ea
- Child:
- 6:211ffef3b88e
--- a/Puck.h Wed Jul 23 13:00:42 2014 +0000
+++ b/Puck.h Wed Jul 23 13:58:35 2014 +0000
@@ -92,6 +92,8 @@
std::vector<CharacteristicWriteCallback> pendingCallbackStack;
std::vector<uint8_t*> pendingCallbackParameterStack;
+ GattCharacteristic **previousCharacteristics;
+
public:
static Puck &getPuck();
@@ -252,11 +254,13 @@
}
services.erase(services.begin() + removeIndex);
delete service;
+ free(previousCharacteristics);
} else {
characteristicsLength = 1;
characteristics = (GattCharacteristic**) malloc(sizeof(GattCharacteristic*) * characteristicsLength);
}
characteristics[characteristicsLength - 1] = characteristic;
+ previousCharacteristics = characteristics;
service = new GattService(serviceUuid, characteristics, characteristicsLength);
services.push_back(service);
}
