50 lines
1.1 KiB
Diff
50 lines
1.1 KiB
Diff
From 3233c91863f9e44bfa5ee984fcc15079f9f8032f Mon Sep 17 00:00:00 2001
|
|
From: Jun Zhang <[email protected]>
|
|
Date: Tue, 11 Feb 2025 19:53:42 +0800
|
|
Subject: [PATCH] bluez: fix rcu reconnect
|
|
|
|
BT:fix BT Remote control disconnected after reboot.[1/1]
|
|
|
|
PD#SWPL-89240
|
|
|
|
Problem:
|
|
BT Remote control disconnected after reboot
|
|
|
|
Solution:
|
|
if have error do not add timer.
|
|
|
|
Verify: T5D
|
|
Change-Id: Ie4b1e2fa5a3966cfa95f6b9603a0651aa811c127
|
|
Signed-off-by: hong.wang <[email protected]>
|
|
---
|
|
src/shared/att.c | 6 ++++++
|
|
1 file changed, 6 insertions(+)
|
|
|
|
diff --git a/src/shared/att.c b/src/shared/att.c
|
|
index f7bef08..9cce738 100644
|
|
--- a/src/shared/att.c
|
|
+++ b/src/shared/att.c
|
|
@@ -188,6 +188,7 @@ static uint8_t get_req_opcode(uint8_t rsp_opcode)
|
|
|
|
struct att_send_op {
|
|
unsigned int id;
|
|
+ unsigned int lastid;
|
|
unsigned int timeout_id;
|
|
enum att_op_type type;
|
|
uint8_t opcode;
|
|
@@ -582,6 +583,11 @@ static bool can_write_data(struct io *io, void *user_data)
|
|
return true;
|
|
}
|
|
|
|
+ if(op->id == 16 && op->lastid == 0) {
|
|
+ return true;
|
|
+ }
|
|
+ op->lastid = op->id;
|
|
+
|
|
timeout = new0(struct timeout_data, 1);
|
|
timeout->chan = chan;
|
|
timeout->id = op->id;
|
|
--
|
|
2.25.1
|
|
|