Fixes to BLE_API for mbedOS Alpha1 release. Mostly relating to doxygen fixes.
Fork of BLE_API by
Diff: services/URIBeacon2Service.h
- Revision:
- 164:93e52c3861a9
- Parent:
- 163:8bd70d17589f
- Child:
- 165:ca406c1d0399
--- a/services/URIBeacon2Service.h Fri Nov 28 14:11:21 2014 +0000 +++ b/services/URIBeacon2Service.h Fri Nov 28 14:11:21 2014 +0000 @@ -77,6 +77,11 @@ */ virtual void onDataWritten(const GattCharacteristicWriteCBParams *params) { if (params->charHandle == uriDataChar.getValueAttribute().getHandle()) { + if (lockedState) { /* when locked, the device isn't allowed to update the uriData characteristic */ + ble.updateCharacteristicValue(uriDataChar.getValueAttribute().getHandle(), uriDataValue, uriDataLength); + return; + } + /* we don't handle very large writes at the moment. */ if ((params->offset != 0) || (params->len > MAX_SIZE_URI_DATA_CHAR_VALUE)) { return;