public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ] gobex: Fix abort for SRM operation
@ 2025-10-09  7:11 Frédéric Danis
  2025-10-09  8:56 ` [BlueZ] " bluez.test.bot
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Frédéric Danis @ 2025-10-09  7:11 UTC (permalink / raw)
  To: linux-bluetooth

The OBEX Abort operation currently triggers an OBEX session
which prevents further OBEX operations:

obexd[327475]: obexd/client/transfer.c:obc_transfer_register()
               0x50e000001380 registered
               /org/bluez/obex/client/session0/transfer0
obexd[327475]: obexd/client/session.c:obc_session_ref() 0x50c0000010c0:
               ref=3
obexd[327475]: obexd/client/session.c:obc_session_ref() 0x50c0000010c0:
               ref=4
obexd[327475]: obexd/client/session.c:session_process_transfer()
               Transfer(0x50e000001380) started
obexd[327475]: obexd/client/session.c:obc_session_unref() 0x50c0000010c0:
               ref=3
obexd[327475]: Transfer(0x50e000001380) Error: Transfer cancelled by user
obexd[327475]: obexd/client/session.c:obc_session_ref() 0x50c0000010c0:
               ref=4
obexd[327475]: obexd/client/transfer.c:obc_transfer_unregister()
               0x50e000001380 unregistered
               /org/bluez/obex/client/session0/transfer0
obexd[327475]: obexd/client/transfer.c:obc_transfer_free() 0x50e000001380
obexd[327475]: obexd/client/session.c:obc_session_unref() 0x50c0000010c0:
               ref=3
obexd[327475]: obexd/client/session.c:obc_session_unref() 0x50c0000010c0:
               ref=2
obexd[327475]: Unknown header offset for opcode 0x10
obexd[327475]: obexd/client/session.c:obc_session_shutdown()
               0x50c0000010c0
obexd[327475]: obexd/client/session.c:obc_session_ref() 0x50c0000010c0:
               ref=3
obexd[327475]: obexd/client/pbap.c:pbap_remove()
               /org/bluez/obex/client/session0
obexd[327475]: obexd/client/session.c:obc_session_unref() 0x50c0000010c0:
               ref=2
obexd[327475]: obexd/client/session.c:obc_session_unref() 0x50c0000010c0:
               ref=1
obexd[327475]: obexd/client/session.c:session_unregistered()
               Session(0x50c0000010c0) unregistered
               /org/bluez/obex/client/session0
obexd[327475]: obexd/client/session.c:obc_session_unref() 0x50c0000010c0:
               ref=0

As its highest bit is always set to 1, and so its value located after
G_OBEX_RSP_CONTINUE, the G_OBEX_OP_ABORT is part of the operations
constants.

This has been tested for PBAP and BIP-AVRCP with Android 15 and 16.
---
 gobex/gobex.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gobex/gobex.c b/gobex/gobex.c
index 0e33ececf..df80d79f3 100644
--- a/gobex/gobex.c
+++ b/gobex/gobex.c
@@ -382,7 +382,7 @@ static void check_srm_final(GObex *obex, guint8 op)
 	case G_OBEX_OP_CONNECT:
 		return;
 	default:
-		if (op <= G_OBEX_RSP_CONTINUE)
+		if (op <= G_OBEX_RSP_CONTINUE || op == G_OBEX_OP_ABORT)
 			return;
 	}
 
-- 
2.43.0


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

end of thread, other threads:[~2025-10-09 19:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-09  7:11 [PATCH BlueZ] gobex: Fix abort for SRM operation Frédéric Danis
2025-10-09  8:56 ` [BlueZ] " bluez.test.bot
2025-10-09 15:53 ` [PATCH BlueZ] " Luiz Augusto von Dentz
2025-10-09 15:58   ` Frédéric Danis
2025-10-09 17:15     ` Luiz Augusto von Dentz
2025-10-09 19:40 ` 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