summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2008-10-19 22:14:22 +0300
committerJohan Hedberg <johan.hedberg@nokia.com>2008-10-19 22:14:22 +0300
commitdf8226b1584a200a81bea35e41d36f03fbafe408 (patch)
tree696a1a5e112a22937ce57bf87a72ea6ebe44b885
parent95f8efcebacc3cc86f96d447f366100f9c8abd9e (diff)
Respond to a stream setup request also on Start_Ind
If the remote end sends a START_CMD while we're setting up the stream use it to notify the stream requestor (unix.c) of success.
-rw-r--r--audio/a2dp.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/audio/a2dp.c b/audio/a2dp.c
index de15a42a..df3c780b 100644
--- a/audio/a2dp.c
+++ b/audio/a2dp.c
@@ -604,12 +604,21 @@ static gboolean start_ind(struct avdtp *session, struct avdtp_local_sep *sep,
void *user_data)
{
struct a2dp_sep *a2dp_sep = user_data;
+ struct a2dp_setup *setup;
if (a2dp_sep->type == AVDTP_SEP_TYPE_SINK)
debug("Sink %p: Start_Ind", sep);
else
debug("Source %p: Start_Ind", sep);
+ setup = find_setup_by_session(session);
+ if (setup) {
+ if (setup->canceled)
+ setup_unref(setup);
+ else
+ finalize_resume(setup);
+ }
+
if (!a2dp_sep->locked) {
a2dp_sep->session = avdtp_ref(session);
a2dp_sep->suspend_timer = g_timeout_add(SUSPEND_TIMEOUT,