summaryrefslogtreecommitdiff
path: root/android/avdtp.c
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2013-12-20 10:33:40 +0200
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2013-12-23 10:59:44 +0200
commitb6cc883696a6edc1c520364ee6e41b93b8c40780 (patch)
tree42e6736ae7ba27998666d3cf74ac278a7a775273 /android/avdtp.c
parent483c6263bc527b3b45157257d2735859bf1758e5 (diff)
downloadbluez-b6cc883696a6edc1c520364ee6e41b93b8c40780.tar.gz
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.
Diffstat (limited to 'android/avdtp.c')
-rw-r--r--android/avdtp.c8
1 files 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);