Skip to content

Commit 44d3504

Browse files
missing overload
1 parent ec373c2 commit 44d3504

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -682,16 +682,24 @@ ble_error_t GattServer::write(
682682
}
683683

684684
// This characteristic has a CCCD attribute. Handle notifications and indications.
685+
size_t updates_sent = 0;
686+
685687
if (is_update_authorized(connection, att_handle)) {
686688
uint16_t cccEnabled = AttsCccEnabled(connection, cccd_index);
687689
if (cccEnabled & ATT_CLIENT_CFG_NOTIFY) {
688690
AttsHandleValueNtf(connection, att_handle, len, (uint8_t*)buffer);
691+
updates_sent++;
689692
}
690693
if (cccEnabled & ATT_CLIENT_CFG_INDICATE) {
691694
AttsHandleValueInd(connection, att_handle, len, (uint8_t*)buffer);
695+
updates_sent++;
692696
}
693697
}
694698

699+
if (updates_sent) {
700+
handleDataSentEvent(updates_sent);
701+
}
702+
695703
return BLE_ERROR_NONE;
696704
}
697705

0 commit comments

Comments
 (0)