Skip to content

Commit 1016666

Browse files
pankorepull[bot]
authored andcommitted
[Ameba] use event handling for BLE disconnect event (#26569)
* use event handling for disconnect event * restyle
1 parent 7be737f commit 1016666

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/platform/Ameba/BLEManagerImpl.cpp

+6-1
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,12 @@ CHIP_ERROR BLEManagerImpl::HandleGAPDisconnect(uint16_t conn_id, uint16_t disc_c
292292
disconReason = BLE_ERROR_CHIPOBLE_PROTOCOL_ABORT;
293293
break;
294294
}
295-
HandleConnectionError(conn_id, disconReason);
295+
296+
ChipDeviceEvent event;
297+
event.Type = DeviceEventType::kCHIPoBLEConnectionError;
298+
event.CHIPoBLEConnectionError.ConId = conn_id;
299+
event.CHIPoBLEConnectionError.Reason = disconReason;
300+
PlatformMgr().PostEventOrDie(&event);
296301

297302
// Force a reconfiguration of advertising in case we switched to non-connectable mode when
298303
// the BLE connection was established.

0 commit comments

Comments
 (0)