diff options
author | Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com> | 2014-06-25 19:30:15 +0300 |
---|---|---|
committer | Szymon Janc <szymon.janc@tieto.com> | 2014-06-26 10:56:26 +0200 |
commit | 09d30507f0e8a72316a9fb5c197aaf9a6b6981e7 (patch) | |
tree | 8b350db63d2d8771bd90ca826df5d6b24e996966 /android/hal-health.c | |
parent | a0ec9aee8f5d5709cfb5925aebbfa2633d3a96c7 (diff) | |
download | bluez-09d30507f0e8a72316a9fb5c197aaf9a6b6981e7.tar.gz |
android/hal-health: Return app_id and channel_id -1 in case of error
Right now returning only status of request but java layer expecting
-1 for app_id and channel_id in failure case.
Diffstat (limited to 'android/hal-health.c')
-rw-r--r-- | android/hal-health.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/android/hal-health.c b/android/hal-health.c index 0d9136dec..858d4990c 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; @@ -180,6 +181,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)); |