hal_ipc_register(HAL_SERVICE_ID_BLUETOOTH, ev_handlers,
sizeof(ev_handlers)/sizeof(ev_handlers[0]));
- if (!hal_ipc_init()) {
+ if (!hal_ipc_init(BLUEZ_HAL_SK_PATH, sizeof(BLUEZ_HAL_SK_PATH))) {
bt_hal_cbacks = NULL;
return BT_STATUS_FAIL;
}
return new_sk;
}
-bool hal_ipc_init(void)
+bool hal_ipc_init(const char *path, size_t size)
{
struct sockaddr_un addr;
int sk;
memset(&addr, 0, sizeof(addr));
addr.sun_family = AF_UNIX;
- memcpy(addr.sun_path, BLUEZ_HAL_SK_PATH, sizeof(BLUEZ_HAL_SK_PATH));
+ memcpy(addr.sun_path, path, size);
if (bind(sk, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
err = errno;
size_t data_len;
};
-bool hal_ipc_init(void);
+bool hal_ipc_init(const char *path, size_t size);
void hal_ipc_cleanup(void);
int hal_ipc_cmd(uint8_t service_id, uint8_t opcode, uint16_t len, void *param,