linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johan Hedberg <johan.hedberg@gmail.com>
To: Sheldon Demario <sheldon.demario@openbossa.org>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] Emit Connect signal for LE capable devices
Date: Mon, 29 Nov 2010 14:52:08 +0200	[thread overview]
Message-ID: <20101129125208.GA15399@jh-x301> (raw)
In-Reply-To: <1290705769-15487-1-git-send-email-sheldon.demario@openbossa.org>

Hi Sheldon,

On Thu, Nov 25, 2010, Sheldon Demario wrote:
> +	if (le) {
> +		evt_le_connection_complete *evt = ptr;
> +		evt_bdaddr = &evt->peer_bdaddr;
> +		evt_handle = evt->handle;
> +		evt_status = evt->status;
> +	}  else {
> +		evt_conn_complete *evt = ptr;
> +		evt_bdaddr = &evt->bdaddr;
> +		evt_handle = evt->handle;
> +		evt_status = evt->status;
> +
> +		if (evt->link_type != ACL_LINK)
> +			return;
> +	}

Instead of this kind of trickery, I have a feeling that the code would
be easier to read if you had a separate function for the LE connect
complete. Could try try to come up with a patch that does it like that?

Johan

  reply	other threads:[~2010-11-29 12:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-25 17:22 [PATCH] Emit Connect signal for LE capable devices Sheldon Demario
2010-11-29 12:52 ` Johan Hedberg [this message]
2010-11-29 13:34   ` Sheldon Demario
2010-11-29 14:05     ` Johan Hedberg
2010-11-29 18:36   ` [PATCH v2] " Sheldon Demario
2010-11-29 20:22     ` 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=20101129125208.GA15399@jh-x301 \
    --to=johan.hedberg@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=sheldon.demario@openbossa.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).