--- 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