Skip to content

Commit 998cdf2

Browse files
authored
Merge pull request ARMmbed#10418 from marcemmers/fix-cordio-gattserver-insert-characteristic
CordioGattServer: reset settings variable before ANDing the properties to it
2 parents 184a053 + d11cf28 commit 998cdf2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

features/FEATURE_BLE/targets/TARGET_CORDIO/source/CordioGattServer.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,8 +321,10 @@ ble_error_t GattServer::insert_characteristic_value_attribute(
321321
memset(attribute_it->pValue + *attribute_it->pLen, 0, attribute_it->maxLen - *attribute_it->pLen);
322322

323323
// Set value attribute settings
324+
attribute_it->settings = 0;
325+
324326
if (properties & READ_PROPERTY) {
325-
attribute_it->settings = ATTS_SET_READ_CBACK;
327+
attribute_it->settings |= ATTS_SET_READ_CBACK;
326328
}
327329
if (properties & WRITABLE_PROPERTIES) {
328330
attribute_it->settings |= ATTS_SET_WRITE_CBACK;

0 commit comments

Comments
 (0)