Linux bluetooth development
 help / color / mirror / Atom feed
From: Johan Hedberg <johan.hedberg@gmail.com>
To: "Frédéric Dalleau" <frederic.dalleau@linux.intel.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] Add watch for RFCOMM disconnect to HFP HF role
Date: Thu, 4 Aug 2011 15:58:10 +0300	[thread overview]
Message-ID: <20110804125810.GA24323@dell> (raw)
In-Reply-To: <1312462310-16965-1-git-send-email-frederic.dalleau@linux.intel.com>

Hi Frédéric,

On Thu, Aug 04, 2011, Frédéric Dalleau wrote:
> ---
>  audio/gateway.c |   22 ++++++++++++++++++++++
>  1 files changed, 22 insertions(+), 0 deletions(-)
> 
> diff --git a/audio/gateway.c b/audio/gateway.c
> index ec0ec5d..200930f 100644
> --- a/audio/gateway.c
> +++ b/audio/gateway.c
> @@ -188,9 +188,29 @@ static void sco_connect_cb(GIOChannel *chan, GError *err, gpointer user_data)
>  				(GIOFunc) sco_io_cb, dev);
>  }
>  
> +static gboolean rfcomm_disconnect_cb(GIOChannel *chan, GIOCondition cond,
> +			struct audio_device *dev)
> +{
> +	struct gateway *gw = dev->gateway;
> +
> +	if (cond & G_IO_NVAL)
> +		return FALSE;
> +
> +	if (cond & (G_IO_ERR | G_IO_HUP)) {

Since this function is only called for NVAL, ERR and HUP, do you even
need to have this check here. Maybe you could just get rid of this
second if-statement.

Johan

  reply	other threads:[~2011-08-04 12:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-04 12:51 [PATCH] Add watch for RFCOMM disconnect to HFP HF role Frédéric Dalleau
2011-08-04 12:58 ` Johan Hedberg [this message]
2011-08-04 13:09   ` Frédéric Dalleau
2011-08-04 13:16     ` Johan Hedberg

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=20110804125810.GA24323@dell \
    --to=johan.hedberg@gmail.com \
    --cc=frederic.dalleau@linux.intel.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