All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] shared/asha: Do not start ASHA in case of CoC connection failure
@ 2025-07-31 16:26 Arkadiusz Bokowy
  2025-07-31 18:03 ` bluez.test.bot
  2025-08-04 15:20 ` [PATCH] " patchwork-bot+bluetooth
  0 siblings, 2 replies; 3+ messages in thread
From: Arkadiusz Bokowy @ 2025-07-31 16:26 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Arkadiusz Bokowy

---
 profiles/audio/asha.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/profiles/audio/asha.c b/profiles/audio/asha.c
index 9bd57d780..a17b877d9 100644
--- a/profiles/audio/asha.c
+++ b/profiles/audio/asha.c
@@ -89,6 +89,11 @@ static void connect_cb(GIOChannel *io, GError *err, gpointer user_data)
 	struct bt_asha_device *asha_dev = conn_data->asha_dev;
 	GError *gerr = NULL;
 
+	if (err) {
+		error("%s", err->message);
+		return;
+	}
+
 	if (!bt_io_get(io, &gerr,
 				BT_IO_OPT_IMTU, &asha_dev->imtu,
 				BT_IO_OPT_OMTU, &asha_dev->omtu,
@@ -96,7 +101,7 @@ static void connect_cb(GIOChannel *io, GError *err, gpointer user_data)
 		/* Let this be non-fatal? */
 		asha_dev->omtu = ASHA_MIN_MTU;
 		asha_dev->imtu = ASHA_CONNECTION_MTU;
-		error("Could not get L2CAP CoC socket MTU: %s", err->message);
+		error("Could not get L2CAP CoC socket MTU: %s", gerr->message);
 		g_error_free(gerr);
 	}
 
@@ -362,7 +367,7 @@ static void asha_source_device_remove(struct btd_service *service)
 	asha_dev = btd_service_get_user_data(service);
 	if (!asha_dev) {
 		/* Can this actually happen? */
-		DBG("Not handlihng ASHA profile");
+		DBG("Not handling ASHA profile");
 		return;
 	}
 
@@ -479,7 +484,7 @@ static int asha_source_disconnect(struct btd_service *service)
 
 	if (!asha_dev) {
 		/* Can this actually happen? */
-		DBG("Not handlihng ASHA profile");
+		DBG("Not handling ASHA profile");
 		return -1;
 	}
 
-- 
2.43.0


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

end of thread, other threads:[~2025-08-04 15:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-31 16:26 [PATCH] shared/asha: Do not start ASHA in case of CoC connection failure Arkadiusz Bokowy
2025-07-31 18:03 ` bluez.test.bot
2025-08-04 15:20 ` [PATCH] " patchwork-bot+bluetooth

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.