Merge pull request #13293 from paul-szczepanek-arm/fix-gatt-rw-callbacks

BLE Fix read and write callbacks for descriptors not firing if characteristic is not readable or writable
pull/13317/head
Martin Kojtal 2020-07-20 08:27:45 +01:00 committed by GitHub
commit 7ef1dbcf93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -510,7 +510,7 @@ ble_error_t GattServer::insert_descriptor(
#endif // BLE_FEATURE_SECURITY
}
if (properties & READ_PROPERTY && !(attribute_it->settings & ATTS_SET_CCC)) {
if (!(attribute_it->settings & ATTS_SET_CCC)) {
attribute_it->settings |= ATTS_SET_READ_CBACK;
}
}
@ -543,7 +543,7 @@ ble_error_t GattServer::insert_descriptor(
#endif // BLE_FEATURE_SECURITY
}
if (properties & WRITABLE_PROPERTIES && !(attribute_it->settings & ATTS_SET_CCC)) {
if (!(attribute_it->settings & ATTS_SET_CCC)) {
attribute_it->settings |= ATTS_SET_WRITE_CBACK;
}
}