Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH v1] gobex: Fix ABORT response being discarded
@ 2026-08-27  8:36 Jinwang Li
  2026-08-27 16:14 ` [v1] " bluez.test.bot
  2026-08-27 17:10 ` [PATCH v1] " patchwork-bot+bluetooth
  0 siblings, 2 replies; 3+ messages in thread
From: Jinwang Li @ 2026-08-27  8:36 UTC (permalink / raw)
  To: linux-bluetooth
  Cc: cheng.jiang, quic_chezhou, wei.deng, shuai.zhang, mengshi.wu,
	jinwang.li, xiuzhuo.shang

g_obex_drop_tx_queue() in transfer_complete() clears any pending tx,
so the ABORT success response should be enqueued after transfer_complete().

Fixes the following PTS test cases:
- OPP/SR/OPH/BV-27-I
- FTP/SR/OTR/BV-02-C
- PBAP/PSE/PDF/BV-06-I
- PBAP/PSE/PBF/BV-03-I

Fixes: 7a35c12a6ceb ("gobex: Fix segfault caused by interrupted transfer")
Assisted-by: Claude:claude-sonnet-5
Signed-off-by: Jinwang Li <jinwang.li@oss.qualcomm.com>
---
 gobex/gobex-transfer.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gobex/gobex-transfer.c b/gobex/gobex-transfer.c
index c94d018b2..e4c7c557d 100644
--- a/gobex/gobex-transfer.c
+++ b/gobex/gobex-transfer.c
@@ -314,11 +314,12 @@ static void transfer_abort_req(GObex *obex, GObexPacket *req, gpointer user_data
 
 	err = g_error_new(G_OBEX_ERROR, G_OBEX_ERROR_CANCELLED,
 						"Request was aborted");
-	rsp = g_obex_packet_new(G_OBEX_RSP_SUCCESS, TRUE, G_OBEX_HDR_INVALID);
-	g_obex_send(obex, rsp, NULL);
 
 	transfer_complete(transfer, err);
 	g_error_free(err);
+
+	rsp = g_obex_packet_new(G_OBEX_RSP_SUCCESS, TRUE, G_OBEX_HDR_INVALID);
+	g_obex_send(obex, rsp, NULL);
 }
 
 static guint8 put_get_bytes(struct transfer *transfer, GObexPacket *req)
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-08-27 17:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-27  8:36 [PATCH v1] gobex: Fix ABORT response being discarded Jinwang Li
2026-08-27 16:14 ` [v1] " bluez.test.bot
2026-08-27 17:10 ` [PATCH v1] " patchwork-bot+bluetooth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox