Wrap call to value handle getter in MBED_ASSERT

pull/14506/head
Abbas Bracken Ziad 2021-04-07 18:05:01 +01:00
parent aaf9435f87
commit 52483f3e30
1 changed files with 2 additions and 2 deletions

View File

@ -1735,7 +1735,7 @@ void GattServer::handleEvent(
switch (type) {
case GattServerEvents::GATT_EVENT_UPDATES_ENABLED:
tr_info("Updates enabled for attribute %d on connection %d", attributeHandle, connHandle);
get_value_handle_by_cccd_handle(attributeHandle, charHandle);
MBED_ASSERT(get_value_handle_by_cccd_handle(attributeHandle, charHandle));
if(eventHandler) {
GattUpdatesEnabledCallbackParams params({
.connHandle = connHandle,
@ -1752,7 +1752,7 @@ void GattServer::handleEvent(
break;
case GattServerEvents::GATT_EVENT_UPDATES_DISABLED:
tr_info("Updates disabled for attribute %d on connection %d", attributeHandle, connHandle);
get_value_handle_by_cccd_handle(attributeHandle, charHandle);
MBED_ASSERT(get_value_handle_by_cccd_handle(attributeHandle, charHandle));
if(eventHandler) {
GattUpdatesDisabledCallbackParams params({
.connHandle = connHandle,