shared/att: Fix not requeueing in the same channel
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Mon, 5 Dec 2022 23:41:34 +0000 (15:41 -0800)
committerAyush Garg <ayush.garg@samsung.com>
Fri, 5 Jan 2024 10:11:34 +0000 (15:41 +0530)
If request needs to be resend due to change in the security use the
chan->queue otherwise it may end up using a different channel.

src/shared/att.c

index f75de1c..0c96eeb 100755 (executable)
@@ -822,8 +822,8 @@ static bool handle_error_rsp(struct bt_att_chan *chan, uint8_t *pdu,
 
        chan->pending_req = NULL;
 
-       /* Push operation back to request queue */
-       return queue_push_head(att->req_queue, op);
+       /* Push operation back to channel queue */
+       return queue_push_head(chan->queue, op);
 }
 
 static void handle_rsp(struct bt_att_chan *chan, uint8_t opcode, uint8_t *pdu,