Commit Graph

6 Commits

Author SHA1 Message Date
Lu Jia e0699b4797 bluetooth: Before releasing the IPC pending_queue, invoke the asynchronous callbacks for all messages contained within it.
bug: v/77564

When deleting the Bluetooth asynchronous instance, the IPC cached messages are directly released, and their asynchronous callbacks will not be invoked. This could lead to memory leaks if resources are released within the callbacks.

Signed-off-by: jialu <jialu@xiaomi.com>
2026-04-27 23:14:52 +08:00
Lu Jia f5965d1303 bluetooth: Add initialization for local variables.
When passed to bt_socket_client_send_with_reply , it may contain undefined values, leading to unpredictable behavior. Initialize packet explicitly before using it.

Signed-off-by: jialu <jialu@xiaomi.com>
Signed-off-by: miot-robot <miot-robot@xiaomi.com>
2026-04-20 14:53:21 +08:00
zhangyuan20 155520406c fix problem that pair pin command do not send accept
Rootcause: Pair pin command do not send accept, The default value is 0, thus rejecting the pair process, So add accept when send to socket.

Signed-off-by: zhangyuan20 <zhangyuan20@xiaomi.com>
2026-04-20 14:53:05 +08:00
Lu Jia 08b110ac5c bluetooth: Using macros to reduce boilerplate code in asynchronous callbacks.
Some processing logic in asynchronous callbacks is identical; extract this common code into a macro.

Signed-off-by: jialu <jialu@xiaomi.com>
2026-04-20 14:52:34 +08:00
Lu Jia 4b66d260fd bluetooth: Before releasing the IPC pending_queue, invoke the asynchronous callbacks for all messages contained within it.
When deleting the Bluetooth asynchronous instance, the IPC cached messages are directly released, and their asynchronous callbacks will not be invoked. This could lead to memory leaks if resources are released within the callbacks.

Signed-off-by: jialu <jialu@xiaomi.com>
2026-04-20 14:52:33 +08:00
fangzhenwei 2550f8a068 ipc: device async api
Signed-off-by: fangzhenwei <fangzhenwei@xiaomi.com>
2026-04-20 14:51:32 +08:00