Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH BlueZ 0/2] btio: handle error from broadcast ISO socket
@ 2026-06-06  6:03 Michal Dzik
  2026-06-06  6:03 ` [PATCH BlueZ 1/2] " Michal Dzik
  2026-06-06  6:03 ` [PATCH BlueZ 2/2] bap: log errors in BIG sync Michal Dzik
  0 siblings, 2 replies; 4+ messages in thread
From: Michal Dzik @ 2026-06-06  6:03 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Michal Dzik

If not handled, server_cb() will be stuck in endless loop of calling
accept() on the socket.

Michal Dzik (2):
  btio: handle error from broadcast ISO socket
  bap: log errors in BIG sync

 btio/btio.c          | 20 ++++++++++++++++++++
 profiles/audio/bap.c |  5 ++++-
 2 files changed, 24 insertions(+), 1 deletion(-)

-- 
2.43.0


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

* [PATCH BlueZ 1/2] btio: handle error from broadcast ISO socket
  2026-06-06  6:03 [PATCH BlueZ 0/2] btio: handle error from broadcast ISO socket Michal Dzik
@ 2026-06-06  6:03 ` Michal Dzik
  2026-06-06  8:48   ` bluez.test.bot
  2026-06-06  6:03 ` [PATCH BlueZ 2/2] bap: log errors in BIG sync Michal Dzik
  1 sibling, 1 reply; 4+ messages in thread
From: Michal Dzik @ 2026-06-06  6:03 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Michal Dzik

If not handled, server_cb() will be stuck in endless loop of calling
accept() on the socket.
---
 btio/btio.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/btio/btio.c b/btio/btio.c
index cfaa9392d..39d4411f7 100644
--- a/btio/btio.c
+++ b/btio/btio.c
@@ -252,6 +252,26 @@ static gboolean server_cb(GIOChannel *io, GIOCondition cond,
 
 	srv_sock = g_io_channel_unix_get_fd(io);
 
+	if (cond & G_IO_ERR) {
+		int err, sk_err;
+		socklen_t len = sizeof(sk_err);
+
+		if (getsockopt(srv_sock, SOL_SOCKET, SO_ERROR, &sk_err, &len)
+									< 0)
+			err = errno;
+		else
+			err = sk_err;
+
+		if (server->connect) {
+			GError *gerr = NULL;
+
+			ERROR_FAILED(&gerr, "ERR on socket", err);
+			server->connect(io, gerr, server->user_data);
+			g_clear_error(&gerr);
+		}
+		return FALSE;
+	}
+
 	cli_sock = accept(srv_sock, NULL, NULL);
 	if (cli_sock < 0) {
 		if (errno == EBADFD)
-- 
2.43.0


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

* [PATCH BlueZ 2/2] bap: log errors in BIG sync
  2026-06-06  6:03 [PATCH BlueZ 0/2] btio: handle error from broadcast ISO socket Michal Dzik
  2026-06-06  6:03 ` [PATCH BlueZ 1/2] " Michal Dzik
@ 2026-06-06  6:03 ` Michal Dzik
  1 sibling, 0 replies; 4+ messages in thread
From: Michal Dzik @ 2026-06-06  6:03 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Michal Dzik

---
 profiles/audio/bap.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/profiles/audio/bap.c b/profiles/audio/bap.c
index b35542488..dd4b3c8ff 100644
--- a/profiles/audio/bap.c
+++ b/profiles/audio/bap.c
@@ -1474,7 +1474,10 @@ static void iso_bcast_confirm_cb(GIOChannel *io, GError *err, void *user_data)
 	int fd;
 	struct bap_data *bap_data = setup->data;
 
-	DBG("BIG Sync completed");
+	if (err)
+		error("BIG Sync failed: %s", err->message);
+	else
+		DBG("BIG Sync completed");
 
 	/* The order of the BIS fds notified from kernel corresponds
 	 * to the order of the BISes that were enqueued before
-- 
2.43.0


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

* RE: btio: handle error from broadcast ISO socket
  2026-06-06  6:03 ` [PATCH BlueZ 1/2] " Michal Dzik
@ 2026-06-06  8:48   ` bluez.test.bot
  0 siblings, 0 replies; 4+ messages in thread
From: bluez.test.bot @ 2026-06-06  8:48 UTC (permalink / raw)
  To: linux-bluetooth, michal.dzik

[-- Attachment #1: Type: text/plain, Size: 989 bytes --]

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=1106927

---Test result---

Test Summary:
CheckPatch                    PASS      0.96 seconds
GitLint                       PASS      0.66 seconds
BuildEll                      PASS      20.29 seconds
BluezMake                     PASS      604.91 seconds
MakeCheck                     PASS      18.76 seconds
MakeDistcheck                 PASS      232.77 seconds
CheckValgrind                 PASS      274.45 seconds
CheckSmatch                   PASS      323.78 seconds
bluezmakeextell               PASS      166.77 seconds
IncrementalBuild              PASS      609.87 seconds
ScanBuild                     PASS      923.71 seconds



https://github.com/bluez/bluez/pull/2182

---
Regards,
Linux Bluetooth


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

end of thread, other threads:[~2026-06-06  8:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-06  6:03 [PATCH BlueZ 0/2] btio: handle error from broadcast ISO socket Michal Dzik
2026-06-06  6:03 ` [PATCH BlueZ 1/2] " Michal Dzik
2026-06-06  8:48   ` bluez.test.bot
2026-06-06  6:03 ` [PATCH BlueZ 2/2] bap: log errors in BIG sync Michal Dzik

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