From 91b4b8f8ec3fb6a866b4919580f7850fdffaa3ad Mon Sep 17 00:00:00 2001 From: Rohit Grover Date: Thu, 26 Feb 2015 14:23:52 +0000 Subject: [PATCH] initialize the min/max length values correctly in the constructor for URIDataChar. Previously, the minLength value was always set to URI_DATA_MAX, whereas maxLen got initialized by the values stored persistently. Except for the case of default initialization, the value of maxLength would always be less than then minLength; causing improper behaviour from the underlying stack while setting up characterisitics. --- services/URIBeaconConfigService.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/URIBeaconConfigService.h b/services/URIBeaconConfigService.h index e0c6466..c2e46f1 100644 --- a/services/URIBeaconConfigService.h +++ b/services/URIBeaconConfigService.h @@ -100,7 +100,7 @@ class URIBeaconConfigService { initSucceeded(false), lockedStateChar(UUID_LOCK_STATE_CHAR, &lockedState), lockChar(UUID_LOCK_CHAR, ¶ms.lock), - uriDataChar(UUID_URI_DATA_CHAR, params.uriData, URI_DATA_MAX, params.uriDataLength, + uriDataChar(UUID_URI_DATA_CHAR, params.uriData, 0, URI_DATA_MAX, GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_READ | GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_WRITE), unlockChar(UUID_UNLOCK_CHAR, ¶ms.lock), flagsChar(UUID_FLAGS_CHAR, ¶ms.flags),