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: BLE_API nRF51822
Fork of Puck by
Diff: Puck.h
- Revision:
- 6:211ffef3b88e
- Parent:
- 5:2f2a2ac6b231
- Parent:
- 4:91506772210d
- Child:
- 7:c07c01c2a741
--- a/Puck.h Wed Jul 23 14:19:52 2014 +0000
+++ b/Puck.h Wed Jul 23 14:34:21 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);
}
