summaryrefslogtreecommitdiff
path: root/android/hal-handsfree.c
diff options
context:
space:
mode:
authorSzymon Janc <szymon.janc@tieto.com>2014-11-16 13:17:54 +0100
committerSzymon Janc <szymon.janc@tieto.com>2014-11-16 13:55:50 +0100
commit1efe7dfb664cb34a15f8020dac02b3bc274fd92a (patch)
tree24ca894e72a6ff68ef507763cb28d8b8bb18e812 /android/hal-handsfree.c
parent346dab1ba19df3584d5f75f17ccc8bee97114e91 (diff)
downloadbluez-1efe7dfb664cb34a15f8020dac02b3bc274fd92a.tar.gz
android/hal-handsfree: Fix missing message size in IPC handlers
All handsfree events have now address parameter and require proper size to be defined in IPC handler. Otherwise IPC will reject those with invalid message size error and shutdown bluetooth.
Diffstat (limited to 'android/hal-handsfree.c')
-rw-r--r--android/hal-handsfree.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/android/hal-handsfree.c b/android/hal-handsfree.c
index c2b3fd55c..f6829411d 100644
--- a/android/hal-handsfree.c
+++ b/android/hal-handsfree.c
@@ -263,9 +263,9 @@ static const struct hal_ipc_handler ev_handlers[] = {
/* HAL_EV_HANDSFREE_VR */
{ handle_vr_state, false, sizeof(struct hal_ev_handsfree_vr_state) },
/*HAL_EV_HANDSFREE_ANSWER */
- { handle_answer, false, 0 },
+ { handle_answer, false, sizeof(struct hal_ev_handsfree_answer) },
/*HAL_EV_HANDSFREE_HANGUP */
- { handle_hangup, false, 0 },
+ { handle_hangup, false, sizeof(struct hal_ev_handsfree_hangup) },
/* HAL_EV_HANDSFREE_VOLUME */
{ handle_volume, false, sizeof(struct hal_ev_handsfree_volume) },
/* HAL_EV_HANDSFREE_DIAL */
@@ -277,17 +277,18 @@ static const struct hal_ipc_handler ev_handlers[] = {
/* HAL_EV_HANDSFREE_CHLD */
{ handle_chld, false, sizeof(struct hal_ev_handsfree_chld) },
/* HAL_EV_HANDSFREE_CNUM */
- { handle_cnum, false, 0 },
+ { handle_cnum, false, sizeof(struct hal_ev_handsfree_cnum) },
/* HAL_EV_HANDSFREE_CIND */
- { handle_cind, false, 0 },
+ { handle_cind, false, sizeof(struct hal_ev_handsfree_cind) },
/* HAL_EV_HANDSFREE_COPS */
- { handle_cops, false, 0 },
+ { handle_cops, false, sizeof(struct hal_ev_handsfree_cops) },
/* HAL_EV_HANDSFREE_CLCC */
- { handle_clcc, false, 0 },
+ { handle_clcc, false, sizeof(struct hal_ev_handsfree_clcc) },
/* HAL_EV_HANDSFREE_UNKNOWN_AT */
{ handle_unknown_at, true, sizeof(struct hal_ev_handsfree_unknown_at) },
/* HAL_EV_HANDSFREE_HSP_KEY_PRESS */
- { handle_hsp_key_press, false, 0 },
+ { handle_hsp_key_press, false,
+ sizeof(struct hal_ev_handsfree_hsp_key_press) },
};
static uint8_t get_mode(void)