mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #10575 from paul-szczepanek-arm/CCC-writeback-fix
BLE: fix CCC callback not being called when writing to a CCCpull/10478/head
commit
8e44a75a75
|
@ -510,7 +510,7 @@ ble_error_t GattServer::insert_descriptor(
|
||||||
#endif // BLE_FEATURE_SECURITY
|
#endif // BLE_FEATURE_SECURITY
|
||||||
}
|
}
|
||||||
|
|
||||||
if (properties & READ_PROPERTY) {
|
if (properties & READ_PROPERTY && !(attribute_it->settings & ATTS_SET_CCC)) {
|
||||||
attribute_it->settings |= ATTS_SET_READ_CBACK;
|
attribute_it->settings |= ATTS_SET_READ_CBACK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -543,7 +543,7 @@ ble_error_t GattServer::insert_descriptor(
|
||||||
#endif // BLE_FEATURE_SECURITY
|
#endif // BLE_FEATURE_SECURITY
|
||||||
}
|
}
|
||||||
|
|
||||||
if (properties & WRITABLE_PROPERTIES) {
|
if (properties & WRITABLE_PROPERTIES && !(attribute_it->settings & ATTS_SET_CCC)) {
|
||||||
attribute_it->settings |= ATTS_SET_WRITE_CBACK;
|
attribute_it->settings |= ATTS_SET_WRITE_CBACK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue