All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pauli Virtanen <pav@iki.fi>
To: linux-bluetooth@vger.kernel.org
Cc: Pauli Virtanen <pav@iki.fi>
Subject: [PATCH BlueZ] shared/bap: fix setting io on linked stream
Date: Sun, 10 Mar 2024 21:40:33 +0200	[thread overview]
Message-ID: <09755693e7900757286d3dc9fd181f8591c21a19.1710099560.git.pav@iki.fi> (raw)

Fix the second bap_stream_set_io call to set the io on the linked
transport, as it's clearly meant to.

Fixes sending duplicate stream stop/start requests.

bluetoothd[588207]: < ACL Data TX: Handle 2048 flags 0x00 dlen 11   #492 [hci1]
      ATT: Write Command (0x52) len 6
        Handle: 0x0098 Type: ASE Control Point (0x2bc6)
          Data: 04020505
            Opcode: Receiver Start Ready (0x04)
            Number of ASE(s): 2
            ASE: #0
            ASE ID: 0x05
            ASE: #1
            ASE ID: 0x05
---
 src/shared/bap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/shared/bap.c b/src/shared/bap.c
index 37fc1de4e..fd99cbbca 100644
--- a/src/shared/bap.c
+++ b/src/shared/bap.c
@@ -5603,7 +5603,7 @@ bool bt_bap_stream_set_io(struct bt_bap_stream *stream, int fd)
 	bap_stream_set_io(stream, INT_TO_PTR(fd));
 
 	if (stream->link)
-		bap_stream_set_io(stream, INT_TO_PTR(fd));
+		bap_stream_set_io(stream->link, INT_TO_PTR(fd));
 
 	return true;
 }
-- 
2.44.0


             reply	other threads:[~2024-03-10 19:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-10 19:40 Pauli Virtanen [this message]
2024-03-10 21:37 ` [BlueZ] shared/bap: fix setting io on linked stream bluez.test.bot
2024-03-11 19:39 ` [PATCH BlueZ] " patchwork-bot+bluetooth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=09755693e7900757286d3dc9fd181f8591c21a19.1710099560.git.pav@iki.fi \
    --to=pav@iki.fi \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.