callbacks to descriptors should not based on characteristic properties

pull/13293/head
Paul Szczeanek 2020-07-14 16:59:58 +01:00
parent 851c8870b6
commit aa42aeb514
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;
}
}