aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Dalleau <frederic.dalleau@linux.intel.com>2012-07-02 17:16:11 +0200
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2012-07-02 18:32:01 +0300
commita6542f9dde491be937c20a835e9d1774ae099ab9 (patch)
tree8823ecff035758223f1813452f52739207358322
parentb0c6296b6f7d38a58a6849120d83092290ca6861 (diff)
downloadbluez-a6542f9dde491be937c20a835e9d1774ae099ab9.tar.gz
bluez-a6542f9dde491be937c20a835e9d1774ae099ab9.tar.xz
bluez-a6542f9dde491be937c20a835e9d1774ae099ab9.zip
audio: Fix missing reply to Acquire in AVDTP
Calling org.bluez.MediaEndpoint.Acquire ends in avdtp_start(). If bluez is acceptor of AVDTP_OPEN, then avdtp_start is delayed in a timer in order to wait for the initiator to send AVDTP_START. If the timer expires, avdtp_start() is called a second time and find that Bluez is acceptor. This time, since a timer already exists, Bluez does nothing and the answer to Acquire is never sent. The idea of this patch is that if we get in the timeout, we will no longer care whether we accepted open or not.
-rw-r--r--audio/avdtp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/audio/avdtp.c b/audio/avdtp.c
index 56a09050..e431ce80 100644
--- a/audio/avdtp.c
+++ b/audio/avdtp.c
@@ -3627,6 +3627,8 @@ static gboolean start_timeout(gpointer user_data)
struct avdtp_stream *stream = user_data;
struct avdtp *session = stream->session;
+ stream->open_acp = 0;
+
if (avdtp_start(session, stream) < 0)
error("wait_timeout: avdtp_start failed");