From b6cc883696a6edc1c520364ee6e41b93b8c40780 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Fri, 20 Dec 2013 10:33:40 +0200 Subject: [PATCH] android/AVDTP: Fix rejecting DELAY_REPORT command while in OPEN state This fixes rejection of DELAY_REPORT command while in OPEN state which is tested by /TP/SIG/SYN/BV-05-C. --- android/avdtp.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/android/avdtp.c b/android/avdtp.c index 4bfc86fc7..02ee92007 100644 --- a/android/avdtp.c +++ b/android/avdtp.c @@ -1732,10 +1732,14 @@ static gboolean avdtp_delayreport_cmd(struct avdtp *session, stream = sep->stream; - if (sep->state != AVDTP_STATE_CONFIGURED && - sep->state != AVDTP_STATE_STREAMING) { + switch (sep->state) { + case AVDTP_STATE_IDLE: + case AVDTP_STATE_ABORTING: + case AVDTP_STATE_CLOSING: err = AVDTP_BAD_STATE; goto failed; + default: + break; } stream->delay = ntohs(req->delay); -- 2.47.3