linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [RFC 19/20] audio/sink: Fix not notifying service about connection state
Date: Wed,  3 Jul 2013 18:15:40 +0300	[thread overview]
Message-ID: <1372864541-10763-20-git-send-email-luiz.dentz@gmail.com> (raw)
In-Reply-To: <1372864541-10763-1-git-send-email-luiz.dentz@gmail.com>

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

btd_service_connecting_complete should be called whenever the service
is connected otherwise the service state will not be consistent.
---
 profiles/audio/sink.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/profiles/audio/sink.c b/profiles/audio/sink.c
index bb9ab21..5206920 100644
--- a/profiles/audio/sink.c
+++ b/profiles/audio/sink.c
@@ -164,6 +164,7 @@ static void stream_state_changed(struct avdtp_stream *stream,
 		sink->cb_id = 0;
 		break;
 	case AVDTP_STATE_OPEN:
+		btd_service_connecting_complete(sink->service, 0);
 		sink_set_state(sink, SINK_STATE_CONNECTED);
 		break;
 	case AVDTP_STATE_STREAMING:
@@ -212,11 +213,8 @@ static void stream_setup_complete(struct avdtp *session, struct a2dp_sep *sep,
 
 	sink->connect_id = 0;
 
-	if (stream) {
-		DBG("Stream successfully created");
-		btd_service_connecting_complete(sink->service, 0);
+	if (stream)
 		return;
-	}
 
 	avdtp_unref(sink->session);
 	sink->session = NULL;
-- 
1.8.1.4


  parent reply	other threads:[~2013-07-03 15:15 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-03 15:15 [RFC 00/20] Remove audio_device and introduce policy plugin Luiz Augusto von Dentz
2013-07-03 15:15 ` [RFC 01/20] audio/sink: Use service user_data for private data Luiz Augusto von Dentz
2013-07-04  6:36   ` Mikel Astiz
2013-07-04  6:49     ` Luiz Augusto von Dentz
2013-07-04 14:28   ` Vinicius Costa Gomes
2013-07-05  6:38     ` Mikel Astiz
2013-07-08 10:00       ` Luiz Augusto von Dentz
2013-07-03 15:15 ` [RFC 02/20] audio/source: " Luiz Augusto von Dentz
2013-07-03 15:15 ` [RFC 03/20] audio/control: " Luiz Augusto von Dentz
2013-07-03 15:15 ` [RFC 04/20] audio/sink: Reduce dependency on struct audio_device Luiz Augusto von Dentz
2013-07-03 15:15 ` [RFC 05/20] audio/source: " Luiz Augusto von Dentz
2013-07-03 15:15 ` [RFC 06/20] audio/control: " Luiz Augusto von Dentz
2013-07-03 15:15 ` [RFC 07/20] audio/AVCTP: Remove " Luiz Augusto von Dentz
2013-07-03 15:15 ` [RFC 08/20] audio/AVDTP: " Luiz Augusto von Dentz
2013-07-03 15:15 ` [RFC 09/20] audio/AVRCP: " Luiz Augusto von Dentz
2013-07-03 15:15 ` [RFC 10/20] audio/control: " Luiz Augusto von Dentz
2013-07-03 15:15 ` [RFC 11/20] audio/A2DP: " Luiz Augusto von Dentz
2013-07-03 15:15 ` [RFC 12/20] audio/sink: " Luiz Augusto von Dentz
2013-07-03 15:15 ` [RFC 13/20] audio/source: " Luiz Augusto von Dentz
2013-07-03 15:15 ` [RFC 14/20] audio/media: " Luiz Augusto von Dentz
2013-07-03 15:15 ` [RFC 15/20] audio/transport: " Luiz Augusto von Dentz
2013-07-03 15:15 ` [RFC 16/20] audio/manager: " Luiz Augusto von Dentz
2013-07-03 15:15 ` [RFC 17/20] audio/main: " Luiz Augusto von Dentz
2013-07-03 15:15 ` [RFC 18/20] plugins/policy: Reword audio policy code in a simple plugin Luiz Augusto von Dentz
2013-07-03 15:15 ` Luiz Augusto von Dentz [this message]
2013-07-04  7:05   ` [RFC 19/20] audio/sink: Fix not notifying service about connection state Mikel Astiz
2013-07-04  7:17     ` Luiz Augusto von Dentz
2013-07-03 15:15 ` [RFC 20/20] audio/source: " Luiz Augusto von Dentz

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=1372864541-10763-20-git-send-email-luiz.dentz@gmail.com \
    --to=luiz.dentz@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /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).