Skip to content

Commit f1625f8

Browse files
committed
Change call for onAttMtuChange to local member eventHandler instance
1 parent e73db5a commit f1625f8

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

connectivity/FEATURE_BLE/source/cordio/source/GattServerImpl.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -931,9 +931,8 @@ void GattServer::cccd_cb(attsCccEvt_t *evt)
931931
void GattServer::att_cb(const attEvt_t *evt)
932932
{
933933
if (evt->hdr.status == ATT_SUCCESS && evt->hdr.event == ATT_MTU_UPDATE_IND) {
934-
ble::GattServer::EventHandler *handler = getInstance().getEventHandler();
935-
if (handler) {
936-
handler->onAttMtuChange(evt->hdr.param, evt->mtu);
934+
if (eventHandler) {
935+
eventHandler->onAttMtuChange(evt->hdr.param, evt->mtu);
937936
}
938937
} else if (evt->hdr.status == ATT_SUCCESS && evt->hdr.event == ATTS_HANDLE_VALUE_CNF) {
939938
getInstance().handleEvent(GattServerEvents::GATT_EVENT_DATA_SENT, evt->hdr.param, evt->handle);

0 commit comments

Comments
 (0)