Skip to content

Commit 8e44a75

Browse files
authored
Merge pull request #10575 from paul-szczepanek-arm/CCC-writeback-fix
BLE: fix CCC callback not being called when writing to a CCC
2 parents 26aa16f + eda0645 commit 8e44a75

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ ble_error_t GattServer::insert_descriptor(
510510
#endif // BLE_FEATURE_SECURITY
511511
}
512512

513-
if (properties & READ_PROPERTY) {
513+
if (properties & READ_PROPERTY && !(attribute_it->settings & ATTS_SET_CCC)) {
514514
attribute_it->settings |= ATTS_SET_READ_CBACK;
515515
}
516516
}
@@ -543,7 +543,7 @@ ble_error_t GattServer::insert_descriptor(
543543
#endif // BLE_FEATURE_SECURITY
544544
}
545545

546-
if (properties & WRITABLE_PROPERTIES) {
546+
if (properties & WRITABLE_PROPERTIES && !(attribute_it->settings & ATTS_SET_CCC)) {
547547
attribute_it->settings |= ATTS_SET_WRITE_CBACK;
548548
}
549549
}

0 commit comments

Comments
 (0)