Right now returning only status of request but java layer expecting -1 for app_id and channel_id in failure case. --- android/hal-health.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/android/hal-health.c b/android/hal-health.c index ac6e87f..35ac5c6 100644 --- a/android/hal-health.c +++ b/android/hal-health.c @@ -82,6 +82,7 @@ static bt_status_t register_application(bthl_reg_param_t *reg, int *app_id) if (!reg || !app_id || !reg->application_name) return BT_STATUS_PARM_INVALID; + *app_id = -1; memset(buf, 0, IPC_MTU); cmd->num_of_mdep = reg->number_of_mdeps; @@ -181,6 +182,7 @@ static bt_status_t connect_channel(int app_id, bt_bdaddr_t *bd_addr, if (!bd_addr || !channel_id) return BT_STATUS_PARM_INVALID; + *channel_id = -1; cmd.app_id = app_id; cmd.mdep_index = mdep_cfg_index; memcpy(cmd.bdaddr, bd_addr, sizeof(cmd.bdaddr)); -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html