Linux bluetooth development
 help / color / mirror / Atom feed
From: Szymon Janc <szymon.janc@tieto.com>
To: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [BlueZ v2 01/12] audio/A2DP: Add implemention of SEP open indication
Date: Tue, 14 Jan 2014 11:54:51 +0100	[thread overview]
Message-ID: <3272865.iSbmScqRCU@uw000953> (raw)
In-Reply-To: <1389696168-26947-1-git-send-email-luiz.dentz@gmail.com>

Hi Luiz,

On Tuesday 14 of January 2014 12:42:37 Luiz Augusto von Dentz wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> 
> ---
>  android/a2dp.c | 49 +++++++++++++++++++++++++++++++++++--------------
>  1 file changed, 35 insertions(+), 14 deletions(-)
> 
> diff --git a/android/a2dp.c b/android/a2dp.c
> index 1f7678a..1a9adb8 100644
> --- a/android/a2dp.c
> +++ b/android/a2dp.c
> @@ -581,9 +581,44 @@ static gboolean sep_setconf_ind(struct avdtp *session,
>  	return TRUE;
>  }
>  
> +static struct a2dp_setup *find_setup(uint8_t id)
> +{
> +	GSList *l;
> +
> +	for (l = setups; l; l = g_slist_next(l)) {
> +		struct a2dp_setup *setup = l->data;
> +
> +		if (setup->endpoint->id == id)
> +			return setup;
> +	}
> +
> +	return NULL;
> +}
> +
> +static gboolean sep_open_ind(struct avdtp *session, struct avdtp_local_sep *sep,
> +				struct avdtp_stream *stream, uint8_t *err,
> +				void *user_data)
> +{
> +	struct a2dp_endpoint *endpoint = user_data;
> +	struct a2dp_setup *setup;
> +
> +	DBG("");
> +
> +	setup = find_setup(endpoint->id);
> +	if (!setup) {
> +		error("Unable to find stream setup for endpoint %u",
> +								endpoint->id);
> +		*err = AVDTP_SEP_NOT_IN_USE;
> +		return FALSE;
> +	}
> +
> +	return TRUE;
> +}
> +
>  static struct avdtp_sep_ind sep_ind = {
>  	.get_capability		= sep_getcap_ind,
>  	.set_configuration	= sep_setconf_ind,
> +	.open			= sep_open_ind,
>  };
>  
>  static uint8_t register_endpoint(const uint8_t *uuid, uint8_t codec,
> @@ -713,20 +748,6 @@ static void bt_audio_close(const void *buf, uint16_t len)
>  	audio_ipc_send_rsp(AUDIO_OP_CLOSE, AUDIO_STATUS_SUCCESS);
>  }
>  
> -static struct a2dp_setup *find_setup(uint8_t id)
> -{
> -	GSList *l;
> -
> -	for (l = setups; l; l = g_slist_next(l)) {
> -		struct a2dp_setup *setup = l->data;
> -
> -		if (setup->endpoint->id == id)
> -			return setup;
> -	}
> -
> -	return NULL;
> -}
> -
>  static void bt_stream_open(const void *buf, uint16_t len)
>  {
>  	const struct audio_cmd_open_stream *cmd = buf;
> 

All patches in this set have been applied, thanks.

-- 
Best regards, 
Szymon Janc

      parent reply	other threads:[~2014-01-14 10:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-14 10:42 [BlueZ v2 01/12] audio/A2DP: Add implemention of SEP open indication Luiz Augusto von Dentz
2014-01-14 10:42 ` [BlueZ v2 02/12] audio/A2DP: Add implemention of SEP close indication Luiz Augusto von Dentz
2014-01-14 10:42 ` [BlueZ v2 03/12] audio/A2DP: Add implemention of SEP start indication Luiz Augusto von Dentz
2014-01-14 10:42 ` [BlueZ v2 04/12] audio/A2DP: Add implemention of SEP suspend indication Luiz Augusto von Dentz
2014-01-14 10:42 ` [BlueZ v2 05/12] android/A2DP: Discover endpoints when initiator Luiz Augusto von Dentz
2014-01-14 10:42 ` [BlueZ v2 06/12] audio/A2DP: Add implemention of SEP set_configuration confirmation Luiz Augusto von Dentz
2014-01-14 10:42 ` [BlueZ v2 07/12] audio/A2DP: Add implemention of SEP open confirmation Luiz Augusto von Dentz
2014-01-14 10:42 ` [BlueZ v2 08/12] audio/A2DP: Add implemention of SEP start confirmation Luiz Augusto von Dentz
2014-01-14 10:42 ` [BlueZ v2 09/12] audio/A2DP: Add implemention of SEP suspend confirmation Luiz Augusto von Dentz
2014-01-14 10:42 ` [BlueZ v2 10/12] audio/A2DP: Add implemention of SEP close confirmation Luiz Augusto von Dentz
2014-01-14 10:42 ` [BlueZ v2 11/12] audio/A2DP: Add implemention of SEP abort confirmation Luiz Augusto von Dentz
2014-01-14 10:42 ` [BlueZ v2 12/12] android/AVDTP: Fix invalid free of struct discover Luiz Augusto von Dentz
2014-01-14 10:54 ` Szymon Janc [this message]

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=3272865.iSbmScqRCU@uw000953 \
    --to=szymon.janc@tieto.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    /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