From f4f6c6026ed31064c46fa8f2765216d8feb1f55c Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Wed, 18 Dec 2013 17:42:36 +0200 Subject: [PATCH] android/AVDTP: Fix not sending delay reporting capability If the SEP supports delay reporting and remote device request is GET_ALL add delay report capability. --- android/avdtp.c | 6 ++++++ unit/test-avdtp.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/android/avdtp.c b/android/avdtp.c index 2a5ea9bb6..4bfc86fc7 100644 --- a/android/avdtp.c +++ b/android/avdtp.c @@ -1209,6 +1209,12 @@ static gboolean avdtp_getcap_cmd(struct avdtp *session, uint8_t transaction, g_free(cap); } + if (get_all && sep->delay_reporting) { + ptr[0] = AVDTP_DELAY_REPORTING; + ptr[1] = 0x00; + rsp_size += 2; + } + g_slist_free(caps); return avdtp_send(session, transaction, AVDTP_MSG_TYPE_ACCEPT, cmd, diff --git a/unit/test-avdtp.c b/unit/test-avdtp.c index a06549596..13f0df663 100644 --- a/unit/test-avdtp.c +++ b/unit/test-avdtp.c @@ -923,7 +923,7 @@ int main(int argc, char *argv[]) raw_pdu(0x02, 0x01, 0x04, 0x00), raw_pdu(0x10, 0x0c, 0x04), raw_pdu(0x12, 0x0c, 0x01, 0x00, 0x07, 0x06, 0x00, 0x00, - 0xff, 0xff, 0x02, 0x40)); + 0xff, 0xff, 0x02, 0x40, 0x08, 0x00)); define_test("/TP/SIG/SMG/BV-27-C", test_server_1_3, raw_pdu(0x00, 0x01), raw_pdu(0x02, 0x01, 0x04, 0x00), -- 2.47.3