avdtp: fix delay report valid states
authorArchie Pusaka <apusaka@chromium.org>
Fri, 20 Mar 2020 05:14:25 +0000 (13:14 +0800)
committerAyush Garg <ayush.garg@samsung.com>
Mon, 12 Apr 2021 09:00:48 +0000 (14:30 +0530)
According to AVDTP specification section 6.19,
avdtp_delayreport_cmd could also be received when the state of SEP
is open.

Therefore, updating to accommodate such condition.

Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
profiles/audio/avdtp.c

index caa6693..a91f403 100644 (file)
@@ -2389,6 +2389,7 @@ static gboolean avdtp_delayreport_cmd(struct avdtp *session,
        stream = sep->stream;
 
        if (sep->state != AVDTP_STATE_CONFIGURED &&
+                                       sep->state != AVDTP_STATE_OPEN &&
                                        sep->state != AVDTP_STATE_STREAMING) {
                err = AVDTP_BAD_STATE;
                goto failed;