diff --git a/android/bluetooth.c b/android/bluetooth.c
index e3f68a7..2a75a22 100644
--- a/android/bluetooth.c
+++ b/android/bluetooth.c
if (adapter.current_settings & MGMT_SETTING_POWERED) {
status = HAL_STATUS_SUCCESS;
- goto failed;
+ goto reply;
}
if (!set_mode(MGMT_OP_SET_POWERED, 0x01)) {
status = HAL_STATUS_FAILED;
- goto failed;
+ goto reply;
}
status = HAL_STATUS_SUCCESS;
-failed:
+reply:
ipc_send_rsp(HAL_SERVICE_ID_BLUETOOTH, HAL_OP_ENABLE, status);
}
if (!(adapter.current_settings & MGMT_SETTING_POWERED)) {
status = HAL_STATUS_SUCCESS;
- goto failed;
+ goto reply;
}
if (!set_mode(MGMT_OP_SET_POWERED, 0x00)) {
status = HAL_STATUS_FAILED;
- goto failed;
+ goto reply;
}
status = HAL_STATUS_SUCCESS;
-failed:
+reply:
ipc_send_rsp(HAL_SERVICE_ID_BLUETOOTH, HAL_OP_DISABLE, status);
}
if (adapter.discovering) {
status = HAL_STATUS_SUCCESS;
- goto failed;
+ goto reply;
}
if (!(adapter.current_settings & MGMT_SETTING_POWERED)) {
status = HAL_STATUS_NOT_READY;
- goto failed;
+ goto reply;
}
if (!start_discovery()) {
status = HAL_STATUS_FAILED;
- goto failed;
+ goto reply;
}
status = HAL_STATUS_SUCCESS;
-failed:
+reply:
ipc_send_rsp(HAL_SERVICE_ID_BLUETOOTH, HAL_OP_START_DISCOVERY, status);
}
if (!adapter.discovering) {
status = HAL_STATUS_SUCCESS;
- goto failed;
+ goto reply;
}
if (!(adapter.current_settings & MGMT_SETTING_POWERED)) {
status = HAL_STATUS_NOT_READY;
- goto failed;
+ goto reply;
}
if (!stop_discovery()) {
status = HAL_STATUS_FAILED;
- goto failed;
+ goto reply;
}
status = HAL_STATUS_SUCCESS;
-failed:
+reply:
ipc_send_rsp(HAL_SERVICE_ID_BLUETOOTH, HAL_OP_CANCEL_DISCOVERY, status);
}