diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2014-04-30 15:18:54 +0300 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2014-04-30 15:45:14 +0300 |
commit | 13eee21e643784d19bdede55089645f83483bbf4 (patch) | |
tree | 2a0ac1c78c9cfa67f8a248fcf7f2441ac8b32fa4 /android/avrcp-lib.c | |
parent | db89f55e0111f0254acdbfefcff84bfa818badfc (diff) | |
download | bluez-13eee21e643784d19bdede55089645f83483bbf4.tar.gz |
android/avrcp-lib: Fix avrcp_get_capabilities_rsp
The PDU that avrcp_get_capabilities_rsp generates are incorrect since it
does not includes the capability.
Diffstat (limited to 'android/avrcp-lib.c')
-rw-r--r-- | android/avrcp-lib.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/android/avrcp-lib.c b/android/avrcp-lib.c index 33d25e2fc..88d50c16e 100644 --- a/android/avrcp-lib.c +++ b/android/avrcp-lib.c @@ -2481,13 +2481,17 @@ int avrcp_add_to_now_playing(struct avrcp *session, uint8_t scope, uint64_t uid, int avrcp_get_capabilities_rsp(struct avrcp *session, uint8_t transaction, uint8_t number, uint8_t *events) { + uint8_t pdu[2]; struct iovec iov[2]; if (number > AVRCP_EVENT_LAST) return -EINVAL; - iov[0].iov_base = &number; - iov[0].iov_len = sizeof(number); + pdu[0] = CAP_EVENTS_SUPPORTED; + pdu[1] = number; + + iov[0].iov_base = pdu; + iov[0].iov_len = sizeof(pdu); iov[1].iov_base = events; iov[1].iov_len = number; |