frameworks_bluetooth/tools
chejinxian1 6c4dc95334 bluetooth/tools: fix bttool cleanup failure on BT disable
bug: v/85832

Fix defects causing bttool resource leak during BT enable/disable
stress test:

1. Store bttool_t pointer in g_bttool_loop->data so TURNING_OFF callback
   can access the async queue (previously always 0, cleanup was skipped)
2. Replace do_in_thread_loop with bttool_uninit() in TURNING_OFF callback
   to send _uninit command via uv_async_queue_send, ensuring bt_tool_uninit
   runs on g_bttool_loop thread (mirrors bttool_quit pattern). Guard with
   CONFIG_LIBUV_EXTENSION only.
3. Add re-entry guard in bt_tool_uninit to prevent double cleanup on
   repeated BT disable cycles

Signed-off-by: chejinxian1 <chejinxian1@xiaomi.com>
2026-04-27 23:14:55 +08:00
..
async bt_uuid: define BT_UUID_STR_LENGTH macro and update usages 2026-04-27 23:14:55 +08:00
gdb update bt gdb tool to latest nxgdb version. 2026-04-20 14:51:26 +08:00
storage_update storage_update: fix build error. 2026-04-27 23:14:53 +08:00
test_suite/android BTS: Add Bond Tool 2026-04-27 23:14:51 +08:00
a2dp_sink.c Clang-format: Update format of all files based on new .clang-format 2026-04-20 14:50:50 +08:00
a2dp_source.c Clang-format: Update format of all files based on new .clang-format 2026-04-20 14:50:50 +08:00
adv.c Merge commit 2026-04-27 23:14:50 +08:00
avrcp_control.c zephyr-pts: add send passthrough cmd for avrcp ct 2026-04-27 23:14:51 +08:00
bt_tools.c bluetooth/tools: fix bttool cleanup failure on BT disable 2026-04-27 23:14:55 +08:00
bt_tools.h CS: add bttool to test cs. 2026-04-27 23:14:55 +08:00
gatt_client.c bttool: Update gattc gatts command, the last parameter is the address type. 2026-04-27 23:14:51 +08:00
gatt_server.c bluetooth: add gatts_connect_bear api [1/2] 2026-04-27 23:14:53 +08:00
hfp_ag.c Merge commit 2026-04-27 23:14:50 +08:00
hfp_hf.c Merge commit 2026-04-27 23:14:50 +08:00
hid_device.c opensource: remove unused codes 2026-04-20 14:51:31 +08:00
l2cap.c bluetooth/tools: fix Coverity defects in l2cap tool 2026-04-27 23:14:55 +08:00
le_cs.c cs: Fix the issue where RAS data is transmitted incompletely (only half sent). 2026-04-27 23:14:55 +08:00
lea_ccp.c Clang-format: Update format of all files based on new .clang-format 2026-04-20 14:50:50 +08:00
lea_client.c Clang-format: Update format of all files based on new .clang-format 2026-04-20 14:50:50 +08:00
lea_mcp.c Clang-format: Update format of all files based on new .clang-format 2026-04-20 14:50:50 +08:00
lea_mcs.c Clang-format: Update format of all files based on new .clang-format 2026-04-20 14:50:50 +08:00
lea_server.c Clang-format: Update format of all files based on new .clang-format 2026-04-20 14:50:50 +08:00
lea_tbs.c Clang-format: Update format of all files based on new .clang-format 2026-04-20 14:50:50 +08:00
lea_vmicp.c Clang-format: Update format of all files based on new .clang-format 2026-04-20 14:50:50 +08:00
lea_vmics.c Clang-format: Update format of all files based on new .clang-format 2026-04-20 14:50:50 +08:00
log.c BTsnoop: add btsnoop API 2026-04-27 23:14:51 +08:00
panu.c Clang-format: Update format of all files based on new .clang-format 2026-04-20 14:50:50 +08:00
scan.c bluetooth:Support scan filter policy feature in bluetooth framework/service. 2026-04-27 23:14:55 +08:00
spp.c bluetooth: add spp insecure feature 2026-04-27 23:14:54 +08:00
storage_transform.c OS-Upgrade: Add a BT storage transformation tool. 2026-04-27 23:14:50 +08:00
utils.c Clang-format: Update format of all files based on new .clang-format 2026-04-20 14:50:50 +08:00
utils.h Clang-format: Update format of all files based on new .clang-format 2026-04-20 14:50:50 +08:00