Diff between 2c0c323d08357a4ff3065fcd49fee0c83b5835cd and af816afa7ed1f70377f02545ae2b297586194adb

Changed Files

File Additions Deletions Status
profiles/audio/asha.c +8 -3 modified

Full Patch

diff --git a/profiles/audio/asha.c b/profiles/audio/asha.c
index 9bd57d7..a17b877 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;
 	}