mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-01 10:40:47 +03:00
fix(ble_mesh): fixed invalid disconnect handler wrote
(cherry picked from commit 52cfff707f)
Co-authored-by: luoxu <luoxu@espressif.com>
This commit is contained in:
@@ -956,10 +956,10 @@ static int gap_event_cb(struct ble_gap_event *event, void *arg)
|
||||
if (index != -ENODEV) {
|
||||
bt_mesh_gatts_conn[index].handle = BLE_MESH_GATT_GET_CONN_ID(event->disconnect.conn.conn_handle);
|
||||
(bt_mesh_gatts_conn_cb->disconnected)(&bt_mesh_gatts_conn[index], event->disconnect.reason);
|
||||
bt_mesh_gatts_conn[index].handle = BT_MESH_GATTS_CONN_UNUSED;
|
||||
} else {
|
||||
BT_ERR("No device");
|
||||
}
|
||||
bt_mesh_gatts_conn[index].handle = BT_MESH_GATTS_CONN_UNUSED;
|
||||
memset(bt_mesh_gatts_addr, 0x0, BLE_MESH_ADDR_LEN);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user