Skip to content

Commit 5959016

Browse files
CC0918nashif
authored andcommitted
Bluetooth: classic: obex: Fix active client validation logic
Fix the active client validation in OBEX abort operations to handle concurrent request scenarios. The check now ensures that if there is an active client and it's different from the current client, the operation is rejected with -EBUSY. Signed-off-by: Cheng Chang <cheng.chang@nxp.com>
1 parent 3a1428f commit 5959016

File tree

1 file changed

+1
-1
lines changed
  • subsys/bluetooth/host/classic

1 file changed

+1
-1
lines changed

subsys/bluetooth/host/classic/obex.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2077,7 +2077,7 @@ int bt_obex_abort(struct bt_obex_client *client, struct net_buf *buf)
20772077
}
20782078

20792079
active_client = atomic_ptr_get(&client->obex->_active_client);
2080-
if (active_client != client) {
2080+
if ((active_client != NULL) && (active_client != client)) {
20812081
LOG_WRN("One OBEX request is executing");
20822082
return -EBUSY;
20832083
}

0 commit comments

Comments
 (0)