mirror of https://github.com/ARMmbed/mbed-os.git
missing overload
parent
f3627530f4
commit
cadfb7edea
|
@ -682,16 +682,24 @@ ble_error_t GattServer::write(
|
||||||
}
|
}
|
||||||
|
|
||||||
// This characteristic has a CCCD attribute. Handle notifications and indications.
|
// This characteristic has a CCCD attribute. Handle notifications and indications.
|
||||||
|
size_t updates_sent = 0;
|
||||||
|
|
||||||
if (is_update_authorized(connection, att_handle)) {
|
if (is_update_authorized(connection, att_handle)) {
|
||||||
uint16_t cccEnabled = AttsCccEnabled(connection, cccd_index);
|
uint16_t cccEnabled = AttsCccEnabled(connection, cccd_index);
|
||||||
if (cccEnabled & ATT_CLIENT_CFG_NOTIFY) {
|
if (cccEnabled & ATT_CLIENT_CFG_NOTIFY) {
|
||||||
AttsHandleValueNtf(connection, att_handle, len, (uint8_t*)buffer);
|
AttsHandleValueNtf(connection, att_handle, len, (uint8_t*)buffer);
|
||||||
|
updates_sent++;
|
||||||
}
|
}
|
||||||
if (cccEnabled & ATT_CLIENT_CFG_INDICATE) {
|
if (cccEnabled & ATT_CLIENT_CFG_INDICATE) {
|
||||||
AttsHandleValueInd(connection, att_handle, len, (uint8_t*)buffer);
|
AttsHandleValueInd(connection, att_handle, len, (uint8_t*)buffer);
|
||||||
|
updates_sent++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (updates_sent) {
|
||||||
|
handleDataSentEvent(updates_sent);
|
||||||
|
}
|
||||||
|
|
||||||
return BLE_ERROR_NONE;
|
return BLE_ERROR_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue