diff options
author | Szymon Janc <szymon.janc@gmail.com> | 2013-12-30 23:56:19 +0100 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2013-12-31 11:34:30 +0200 |
commit | 33c2a480a8bdeaf077d77bdc43bc660015b3edbe (patch) | |
tree | 77f7c235515b3b7e9b8065ab3dbf30f337edef08 /android/hal-hidhost.c | |
parent | af6b7bef235f5d68897302b5b975c0611bb3de47 (diff) | |
download | bluez-33c2a480a8bdeaf077d77bdc43bc660015b3edbe.tar.gz |
android/hidhost: Move get_report parameter check to daemon
HAL library is to be as simple as possible and parameters values should
be verified by daemon for robustness anyway. Move this check to daemon.
Diffstat (limited to 'android/hal-hidhost.c')
-rw-r--r-- | android/hal-hidhost.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/android/hal-hidhost.c b/android/hal-hidhost.c index b33114598..371250ace 100644 --- a/android/hal-hidhost.c +++ b/android/hal-hidhost.c @@ -268,19 +268,8 @@ static bt_status_t get_report(bt_bdaddr_t *bd_addr, cmd.id = report_id; cmd.buf_size = buffer_size; - switch (report_type) { - case BTHH_INPUT_REPORT: - cmd.type = HAL_HIDHOST_INPUT_REPORT; - break; - case BTHH_OUTPUT_REPORT: - cmd.type = HAL_HIDHOST_OUTPUT_REPORT; - break; - case BTHH_FEATURE_REPORT: - cmd.type = HAL_HIDHOST_FEATURE_REPORT; - break; - default: - return BT_STATUS_PARM_INVALID; - } + /* type match IPC type */ + cmd.type = report_type; return hal_ipc_cmd(HAL_SERVICE_ID_HIDHOST, HAL_OP_HIDHOST_GET_REPORT, sizeof(cmd), &cmd, 0, NULL, NULL); |