return -1;
}
- ret = __execute_command("/usr/etc/bluetooth/bt-stack-up.sh", NULL);
+ ret = __bt_call_systemact_service(BT_SYSTEMACT_STACK_UP);
if (ret < 0) {
- BT_ERR("Failed to run script");
- __bt_call_systemact_service(BT_SYSTEMACT_HCI_LOGGER_STOP);
+ BT_ERR("Failed to call systemact service");
return -1;
}
__bt_core_set_status(BT_ACTIVATING);
if (TIZEN_FEATURE_BT_USB_DONGLE) {
- char *argv_up[] = {"/usr/bin/hciconfig", "/usr/bin/hciconfig", "hci0", "up", NULL};
- ret = __execute_command("/usr/bin/hciconfig", argv_up);
+ ret = __bt_call_systemact_service(BT_SYSTEMACT_HCI_UP);
+ if (ret < 0)
+ BT_ERR("Failed to call systemact service");
} else {
ret = __bt_stack_up();
}
if (ret < 0) {
BT_ERR("running script failed");
if (TIZEN_FEATURE_BT_USB_DONGLE) {
- char *argv_down[] = {"/usr/bin/hciconfig", "/usr/bin/hciconfig", "hci0", "down", NULL};
- ret = __execute_command("/usr/bin/hciconfig", argv_down);
+ ret = __bt_call_systemact_service(BT_SYSTEMACT_HCI_DOWN);
+ if (ret < 0)
+ BT_ERR("Failed to call systemact service");
} else {
ret = __execute_command("/usr/etc/bluetooth/bt-dev-end.sh", NULL);
}
if (status == BT_ACTIVATING) {
/* Forcely terminate */
if (TIZEN_FEATURE_BT_USB_DONGLE) {
- char *argv_down[] = {"/usr/bin/hciconfig", "/usr/bin/hciconfig", "hci0", "down", NULL};
- if (__execute_command("/usr/bin/hciconfig", argv_down) < 0)
- BT_ERR("running script failed");
+ if (__bt_call_systemact_service(BT_SYSTEMACT_HCI_DOWN) < 0)
+ BT_ERR("Failed to call systemact service");
} else {
-
#ifdef TIZEN_FEATURE_RADIO
int radio_status = VCONFKEY_RADIO_STATUS_OFF;
BT_DBG("Radio status: %d", radio_status);
if (radio_status == VCONFKEY_RADIO_STATUS_ON) {
- if (__execute_command("/usr/etc/bluetooth/bt-stack-down-with-radio.sh", NULL) < 0)
+ if (__bt_call_systemact_service(BT_SYSTEMACT_STACK_DOWN_WITH_RADIO) < 0)
BT_ERR("running script failed");
} else {
- if (__execute_command("/usr/etc/bluetooth/bt-stack-down.sh", NULL) < 0)
+ if (__bt_call_systemact_service(BT_SYSTEMACT_STACK_DOWN) < 0)
BT_ERR("running script failed");
}
#else
- if (__execute_command("/usr/etc/bluetooth/bt-stack-down.sh", NULL) < 0)
+ if (__bt_call_systemact_service(BT_SYSTEMACT_STACK_DOWN) < 0)
BT_ERR("running script failed");
#endif
}
__bt_core_set_status(BT_DEACTIVATING);
if (TIZEN_FEATURE_BT_USB_DONGLE) {
- char *argv_down[] = {"/usr/bin/hciconfig", "/usr/bin/hciconfig", "hci0", "down", NULL};
- if (__execute_command("/usr/bin/hciconfig", argv_down) < 0) {
- BT_ERR("running script failed");
+ if (__bt_call_systemact_service(BT_SYSTEMACT_HCI_DOWN) < 0) {
+ BT_ERR("Failed to call systemact service");
__bt_core_set_status(BT_ACTIVATED);
return -1;
}
BT_DBG("Radio status: %d", radio_status);
if (radio_status == VCONFKEY_RADIO_STATUS_ON) {
- if (__execute_command("/usr/etc/bluetooth/bt-stack-down-with-radio.sh", NULL) < 0) {
+ if (__bt_call_systemact_service(BT_SYSTEMACT_STACK_DOWN_WITH_RADIO) < 0) {
BT_ERR("running script failed");
__bt_core_set_status(BT_ACTIVATED);
return -1;
}
} else {
- if (__execute_command("/usr/etc/bluetooth/bt-stack-down.sh", NULL) < 0) {
+ if (__bt_call_systemact_service(BT_SYSTEMACT_STACK_DOWN) < 0) {
BT_ERR("running script failed");
__bt_core_set_status(BT_ACTIVATED);
return -1;
}
}
#else
- if (__execute_command("/usr/etc/bluetooth/bt-stack-down.sh", NULL) < 0) {
+ if (__bt_call_systemact_service(BT_SYSTEMACT_STACK_DOWN) < 0) {
BT_ERR("running script failed");
__bt_core_set_status(BT_ACTIVATED);
return -1;
__bt_core_set_le_status(BT_LE_ACTIVATING);
BT_DBG("Activate BT");
if (TIZEN_FEATURE_BT_USB_DONGLE) {
- char *argv_up[] = {"/usr/bin/hciconfig", "/usr/bin/hciconfig", "hci0", "up", NULL};
- ret = __execute_command("/usr/bin/hciconfig", argv_up);
+ ret = __bt_call_systemact_service(BT_SYSTEMACT_HCI_UP);
+ if (ret < 0)
+ BT_ERR("Failed to call systemact service");
} else {
- ret = __execute_command("/usr/etc/bluetooth/bt-stack-up.sh", NULL);
+ ret = __bt_call_systemact_service(BT_SYSTEMACT_STACK_UP);
+ if (ret < 0)
+ BT_ERR("Failed to call systemact service");
}
if (ret < 0) {
BT_ERR("running script failed");
if (TIZEN_FEATURE_BT_USB_DONGLE) {
- char *argv_down[] = {"/usr/bin/hciconfig", "/usr/bin/hciconfig", "hci0", "down", NULL};
- ret = __execute_command("/usr/bin/hciconfig", argv_down);
+ ret = __bt_call_systemact_service(BT_SYSTEMACT_HCI_DOWN);
+ if (ret < 0)
+ BT_ERR("Failed to call systemact service");
} else {
ret = __execute_command("/usr/etc/bluetooth/bt-dev-end.sh &", NULL);
}
__bt_core_set_le_status(BT_LE_DEACTIVATING);
int ret;
if (TIZEN_FEATURE_BT_USB_DONGLE) {
- char *argv_down[] = {"/usr/bin/hciconfig", "/usr/bin/hciconfig", "hci0", "down", NULL};
- ret = __execute_command("/usr/bin/hciconfig", argv_down);
+ ret = __bt_call_systemact_service(BT_SYSTEMACT_HCI_DOWN);
+ if (ret < 0)
+ BT_ERR("Failed to call systemact service");
} else {
ret = __execute_command("/usr/etc/bluetooth/bt-stack-down.sh", NULL);
}