mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2025-01-24 13:23:29 +08:00
android: Use ipc_send_rsp helper for replying success
Where applicable use helper as this make code easier to understand.
This commit is contained in:
parent
6456e15664
commit
a50edbf560
@ -2263,7 +2263,7 @@ void bt_bluetooth_handle_cmd(int sk, uint8_t opcode, void *buf, uint16_t len)
|
||||
goto error;
|
||||
}
|
||||
|
||||
ipc_send(sk, HAL_SERVICE_ID_BLUETOOTH, opcode, 0, NULL, -1);
|
||||
ipc_send_rsp(HAL_SERVICE_ID_BLUETOOTH, opcode, HAL_STATUS_SUCCESS);
|
||||
return;
|
||||
|
||||
error:
|
||||
|
@ -115,8 +115,8 @@ static void service_register(void *buf, uint16_t len)
|
||||
|
||||
services[m->service_id] = true;
|
||||
|
||||
ipc_send(g_io_channel_unix_get_fd(hal_cmd_io), HAL_SERVICE_ID_CORE,
|
||||
HAL_OP_REGISTER_MODULE, 0, NULL, -1);
|
||||
ipc_send_rsp(HAL_SERVICE_ID_CORE, HAL_OP_REGISTER_MODULE,
|
||||
HAL_STATUS_SUCCESS);
|
||||
|
||||
info("Service ID=%u registered", m->service_id);
|
||||
return;
|
||||
@ -157,8 +157,8 @@ static void service_unregister(void *buf, uint16_t len)
|
||||
|
||||
services[m->service_id] = false;
|
||||
|
||||
ipc_send(g_io_channel_unix_get_fd(hal_cmd_io), HAL_SERVICE_ID_CORE,
|
||||
HAL_OP_UNREGISTER_MODULE, 0, NULL, -1);
|
||||
ipc_send_rsp(HAL_SERVICE_ID_CORE, HAL_OP_UNREGISTER_MODULE,
|
||||
HAL_STATUS_SUCCESS);
|
||||
|
||||
info("Service ID=%u unregistered", m->service_id);
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user