diff options
author | Andrzej Kaczmarek <andrzej.kaczmarek@tieto.com> | 2014-03-04 21:43:21 +0100 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2014-03-05 10:32:49 +0200 |
commit | 5071d7dd621b5d04720c2decec2325c5777b872d (patch) | |
tree | 64c00febd8978f4bf60f212ff4333799799142aa /android/avrcp.c | |
parent | acf7c2a96607f8b616daedbd163466b036243af0 (diff) | |
download | bluez-5071d7dd621b5d04720c2decec2325c5777b872d.tar.gz |
android/avrcp: Fix response for RegisterNotification
Diffstat (limited to 'android/avrcp.c')
-rw-r--r-- | android/avrcp.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/android/avrcp.c b/android/avrcp.c index 319c7e6e7..7bd6165f2 100644 --- a/android/avrcp.c +++ b/android/avrcp.c @@ -259,6 +259,7 @@ static void handle_register_notification(const void *buf, uint16_t len) struct avrcp_request *req; uint8_t pdu[IPC_MTU]; size_t pdu_len; + uint8_t code; int ret; DBG(""); @@ -284,8 +285,20 @@ static void handle_register_notification(const void *buf, uint16_t len) goto done; } + switch (cmd->type) { + case HAL_AVRCP_EVENT_TYPE_INTERIM: + code = AVC_CTYPE_INTERIM; + break; + case HAL_AVRCP_EVENT_TYPE_CHANGED: + code = AVC_CTYPE_CHANGED; + break; + default: + status = HAL_STATUS_FAILED; + goto done; + } + ret = avrcp_register_notification_rsp(req->dev->session, - req->transaction, cmd->type, + req->transaction, code, pdu, pdu_len); if (ret < 0) { status = HAL_STATUS_FAILED; |