linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johan Hedberg <johan.hedberg@gmail.com>
To: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH BlueZ 2/8] audio: Fix handling of a2dp suspend indication
Date: Fri, 15 Jun 2012 12:30:13 +0300	[thread overview]
Message-ID: <20120615093013.GA28900@x220> (raw)
In-Reply-To: <1339747468-31639-2-git-send-email-luiz.dentz@gmail.com>

Hi Luiz,

On Fri, Jun 15, 2012, Luiz Augusto von Dentz wrote:
> @@ -985,6 +985,9 @@ static gboolean suspend_ind(struct avdtp *session, struct avdtp_local_sep *sep,
>  				void *user_data)
>  {
>  	struct a2dp_sep *a2dp_sep = user_data;
> +	struct a2dp_setup *setup;
> +	gboolean start;
> +	int perr;

Could you just call this start_err?

Why isn't err used in this function?

> +	perr = avdtp_start(session, a2dp_sep->stream);
> +	if (perr < 0) {
> +		error("Error on avdtp_start %s (%d)", strerror(-perr), -perr);
> +		finalize_setup_errno(setup, -EIO, finalize_resume);

Why aren't you passing perr instead of -EIO to finalize_setup_errno? If
there's a valid reason for ignoring the specific value you should at
least add a code comment for it.

Johan

  reply	other threads:[~2012-06-15  9:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-15  8:04 [PATCH BlueZ 1/8] audio: Add handling of avdtp command collision Luiz Augusto von Dentz
2012-06-15  8:04 ` [PATCH BlueZ 2/8] audio: Fix handling of a2dp suspend indication Luiz Augusto von Dentz
2012-06-15  9:30   ` Johan Hedberg [this message]
2012-06-15 12:41     ` Luiz Augusto von Dentz
2012-06-15  8:04 ` [PATCH BlueZ 3/8] audio: Fix handling of a2dp open indication Luiz Augusto von Dentz
2012-06-15  8:04 ` [PATCH BlueZ 4/8] audio: Fix handling of a2dp start indication Luiz Augusto von Dentz
2012-06-15  9:31   ` Johan Hedberg
2012-06-15  8:04 ` [PATCH BlueZ 5/8] audio: Fix handling of a2dp abort indication Luiz Augusto von Dentz
2012-06-15  8:04 ` [PATCH BlueZ 6/8] audio: Wait remote side to send AVDTP_START when acting as acceptor Luiz Augusto von Dentz
2012-06-15  8:04 ` [PATCH BlueZ 7/8] AVDTP: Do not respond ABORT command with invalid id Luiz Augusto von Dentz
2012-06-15  8:04 ` [PATCH BlueZ 8/8] AVDTP: Fix responding to ABORT with reject 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=20120615093013.GA28900@x220 \
    --to=johan.hedberg@gmail.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;
as well as URLs for NNTP newsgroup(s).