From: Sheldon Demario <sheldon.demario@openbossa.org>
To: linux-bluetooth@vger.kernel.org, Johan Hedberg <johan.hedberg@gmail.com>
Subject: Re: [PATCH] Emit Connect signal for LE capable devices
Date: Mon, 29 Nov 2010 08:34:12 -0500 [thread overview]
Message-ID: <4CF3ABD4.6080809@openbossa.org> (raw)
In-Reply-To: <20101129125208.GA15399@jh-x301>
On 11/29/2010 07:52 AM, Johan Hedberg wrote:
> 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?
For sure, but don't you think that doing this way there will be a lot of
duplicated code?
Sheldon.
next prev parent reply other threads:[~2010-11-29 13:34 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
2010-11-29 13:34 ` Sheldon Demario [this message]
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=4CF3ABD4.6080809@openbossa.org \
--to=sheldon.demario@openbossa.org \
--cc=johan.hedberg@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.