summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2009-09-16 14:15:22 +0300
committerJohan Hedberg <johan.hedberg@nokia.com>2009-09-16 14:15:22 +0300
commit9cec7f8d2f69aa13474d6943f3e3edcc15f85899 (patch)
tree6d9839e706c7194ee16389b1cd12faa6839dd3f2
parentde310b61216299ae436f49817015ed33bc95c268 (diff)
downloadbluez-9cec7f8d2f69aa13474d6943f3e3edcc15f85899.tar.gz
Fix AVDTP suspend while closing
We should reject any suspend request if we've already started the close procedure for a stream.
-rw-r--r--audio/avdtp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/audio/avdtp.c b/audio/avdtp.c
index 41ded83a0..f6441c71d 100644
--- a/audio/avdtp.c
+++ b/audio/avdtp.c
@@ -3249,7 +3249,7 @@ int avdtp_suspend(struct avdtp *session, struct avdtp_stream *stream)
if (!g_slist_find(session->streams, stream))
return -EINVAL;
- if (stream->lsep->state <= AVDTP_STATE_OPEN)
+ if (stream->lsep->state <= AVDTP_STATE_OPEN || stream->close_int)
return -EINVAL;
memset(&req, 0, sizeof(req));