diff --git a/android/hal-bluetooth.c b/android/hal-bluetooth.c
index be45836..4f0e7b7 100644
--- a/android/hal-bluetooth.c
+++ b/android/hal-bluetooth.c
#include "hal-ipc.h"
#include "hal-utils.h"
-#define SNOOP_SERVICE_NAME "bluetoothd-snoop"
-
static const bt_callbacks_t *bt_hal_cbacks = NULL;
#define enum_prop_to_hal(prop, hal_prop, type) do { \
static int config_hci_snoop_log(uint8_t enable)
{
+ const char *property;
+
DBG("enable %u", enable);
- if (enable && property_set("ctl.start", SNOOP_SERVICE_NAME) < 0) {
- error("Failed to start service %s", SNOOP_SERVICE_NAME);
- return BT_STATUS_FAIL;
- }
+ property = enable ? "bluetooth.start" : "bluetooth.stop";
- if (!enable && property_set("ctl.stop", SNOOP_SERVICE_NAME) < 0) {
- error("Failed to stop service %s", SNOOP_SERVICE_NAME);
+ if (property_set(property, "snoop") < 0) {
+ error("Failed to set %s=snoop", property);
return BT_STATUS_FAIL;
}
diff --git a/android/hal-ipc.c b/android/hal-ipc.c
index 97f1bcd..99ba38e 100644
--- a/android/hal-ipc.c
+++ b/android/hal-ipc.c
#include "hal-ipc.h"
#define CONNECT_TIMEOUT (5 * 1000)
-#define SERVICE_NAME "bluetoothd"
static int cmd_sk = -1;
static int notif_sk = -1;
}
/* Start Android Bluetooth daemon service */
- if (property_set("ctl.start", SERVICE_NAME) < 0) {
- error("Failed to start service %s", SERVICE_NAME);
+ if (property_set("bluetooth.start", "daemon") < 0) {
+ error("Failed to set bluetooth.start=daemon");
close(sk);
return false;
}