[PATCH 08/10] android/hal-ipc: Move daemon starting to bluetooth HAL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 android/hal-bluetooth.c | 8 ++++++++
 android/hal-ipc.c       | 6 ------
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/android/hal-bluetooth.c b/android/hal-bluetooth.c
index a220328..b8eae69 100644
--- a/android/hal-bluetooth.c
+++ b/android/hal-bluetooth.c
@@ -423,6 +423,14 @@ static int init(bt_callbacks_t *callbacks)
 
 	bt_hal_cbacks = callbacks;
 
+	/* Start Android Bluetooth daemon service */
+	if (property_set("bluetooth.start", "daemon") < 0) {
+		error("Failed to set bluetooth.start=daemon");
+		hal_ipc_cleanup();
+		bt_hal_cbacks = NULL;
+		return BT_STATUS_FAIL;
+	}
+
 	if (!hal_ipc_accept()) {
 		hal_ipc_cleanup();
 		bt_hal_cbacks = NULL;
diff --git a/android/hal-ipc.c b/android/hal-ipc.c
index b1b85b0..7dd6870 100644
--- a/android/hal-ipc.c
+++ b/android/hal-ipc.c
@@ -238,12 +238,6 @@ bool hal_ipc_accept(void)
 {
 	int err;
 
-	/* Start Android Bluetooth daemon service */
-	if (property_set("bluetooth.start", "daemon") < 0) {
-		error("Failed to set bluetooth.start=daemon");
-		return false;
-	}
-
 	cmd_sk = accept_connection(listen_sk);
 	if (cmd_sk < 0)
 		return false;
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux