Skip to content

Commit

Permalink
missing onDataSent calblack for cordio
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-szczepanek-arm committed Sep 4, 2018
1 parent 44925d8 commit ec373c2
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -624,22 +624,30 @@ ble_error_t GattServer::write(
// successful
uint16_t conn_id = 0;
uint16_t conn_found = 0;
size_t updates_sent = 0;

while((conn_found < DM_CONN_MAX) && (conn_id < CONNECTION_ID_LIMIT)) {
if (DmConnInUse(conn_id) == true) {
++conn_found;
if (is_update_authorized(conn_id, att_handle)) {
uint16_t cccd_config = AttsCccEnabled(conn_id, cccd_index);
if (cccd_config & ATT_CLIENT_CFG_NOTIFY) {
AttsHandleValueNtf(conn_id, att_handle, len, (uint8_t*)buffer);
updates_sent++;
}
if (cccd_config & ATT_CLIENT_CFG_INDICATE) {
AttsHandleValueInd(conn_id, att_handle, len, (uint8_t*)buffer);
updates_sent++;
}
}
}
++conn_id;
}

if (updates_sent) {
handleDataSentEvent(updates_sent);
}

return BLE_ERROR_NONE;
}

Expand Down

0 comments on commit ec373c2

Please sign in to comment.