From: Mikel Astiz <mikel.astiz.oss@gmail.com>
To: linux-bluetooth@vger.kernel.org
Cc: deymo@chromium.org, Mikel Astiz <mikel.astiz@bmw-carit.de>
Subject: [PATCH BlueZ v0 3/4] avrcp: Fix service connections not reported to core
Date: Thu, 23 May 2013 11:28:28 +0200 [thread overview]
Message-ID: <1369301309-25189-4-git-send-email-mikel.astiz.oss@gmail.com> (raw)
In-Reply-To: <1369301309-25189-1-git-send-email-mikel.astiz.oss@gmail.com>
From: Mikel Astiz <mikel.astiz@bmw-carit.de>
Similarly to disconnections, control.c cannot rely on the role
information used in avrcp.c in order to report the core about service
state changes. Therefore, consider both roles as connected once the
AVRCP session has been created if the core had previouls requested the
connection of the other role.
---
profiles/audio/control.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/profiles/audio/control.c b/profiles/audio/control.c
index f17e271..d2cc163 100644
--- a/profiles/audio/control.c
+++ b/profiles/audio/control.c
@@ -71,11 +71,19 @@ struct control {
void control_target_connected(struct control *control)
{
btd_service_connecting_complete(control->target, 0);
+
+ if (control->remote != NULL && btd_service_get_state(control->remote) ==
+ BTD_SERVICE_STATE_CONNECTING)
+ btd_service_connecting_complete(control->remote, 0);
}
void control_remote_connected(struct control *control)
{
btd_service_connecting_complete(control->remote, 0);
+
+ if (control->target != NULL && btd_service_get_state(control->target) ==
+ BTD_SERVICE_STATE_CONNECTING)
+ btd_service_connecting_complete(control->target, 0);
}
void control_disconnected(struct control *control)
--
1.8.1.4
next prev parent reply other threads:[~2013-05-23 9:28 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-23 9:28 [PATCH BlueZ v0 0/4] AVRCP connection-tracking issues Mikel Astiz
2013-05-23 9:28 ` [PATCH BlueZ v0 1/4] avrcp: Fix missing reply to profile connect Mikel Astiz
2013-05-23 9:28 ` [PATCH BlueZ v0 2/4] control: Remove unused parameter Mikel Astiz
2013-05-23 9:28 ` Mikel Astiz [this message]
2013-05-23 9:28 ` [PATCH BlueZ v0 4/4] avrcp: Don't require active sink in role heuristic Mikel Astiz
2013-05-23 16:21 ` [PATCH BlueZ v0 0/4] AVRCP connection-tracking issues Luiz Augusto von Dentz
2013-05-23 16:45 ` Luiz Augusto von Dentz
2013-05-23 19:45 ` Alex Deymo
2013-05-23 20:27 ` Luiz Augusto von Dentz
2013-05-23 21:05 ` Alex Deymo
2013-05-23 21:12 ` Luiz Augusto von Dentz
2013-05-23 22:46 ` Alex Deymo
2013-05-24 7:05 ` Mikel Astiz
2013-05-25 0:56 ` Luiz Augusto von Dentz
2013-05-26 9:30 ` Mikel Astiz
2013-05-27 13:07 ` Luiz Augusto von Dentz
2013-05-27 14:06 ` Mikel Astiz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1369301309-25189-4-git-send-email-mikel.astiz.oss@gmail.com \
--to=mikel.astiz.oss@gmail.com \
--cc=deymo@chromium.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=mikel.astiz@bmw-carit.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).