From: Johan Hedberg <johan.hedberg@gmail.com>
To: Claudio Takahasi <claudio.takahasi@openbossa.org>
Cc: linux-bluetooth@vger.kernel.org,
Sheldon Demario <sheldon.demario@openbossa.org>
Subject: Re: [PATCH v2 2/5] Change CreatePairedDevice to support LE devices
Date: Tue, 21 Dec 2010 00:59:09 +0200 [thread overview]
Message-ID: <20101220225909.GA6365@jh-x301> (raw)
In-Reply-To: <1292885021-21619-1-git-send-email-claudio.takahasi@openbossa.org>
Hi,
> +static struct btd_device *create_common(DBusConnection *conn,
I don't really like this name since it doesn't explain what the function
does in any way except that it creates "something". Could you call it
e.g. __create_device() or create_device_internal()?
> + if (type == DEVICE_TYPE_LE && !event_is_connectable(dev->evt_type)) {
> + if (force)
> + goto create;
> +
> + if (err)
> + *err = -ENOTCONN;
> +
> + return NULL;
> + }
> +
> +create:
You could avoid the label and goto by simply adding if (!force && type...
to the beginning of the if-statement.
> +int device_browse_primary(struct btd_device *device, DBusConnection *conn,
> + DBusMessage *msg, gboolean sec_level_high)
Could you call the gboolean parameter just "secure"?
Johan
next prev parent reply other threads:[~2010-12-20 22:59 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-15 19:54 [PATCH 1/5] Implement cancel primary discovery session Claudio Takahasi
2010-12-15 19:54 ` [PATCH 2/5] Change CreatePairedDevice to support LE devices Claudio Takahasi
2010-12-16 9:24 ` Johan Hedberg
2010-12-16 17:16 ` Claudio Takahasi
2010-12-16 21:01 ` Johan Hedberg
2010-12-20 22:43 ` [PATCH v2 " Claudio Takahasi
2010-12-20 22:59 ` Johan Hedberg [this message]
2010-12-20 23:57 ` [PATCH v3 " Sheldon Demario
2010-12-21 8:42 ` Johan Hedberg
2010-12-21 14:34 ` [PATCH v4 " Sheldon Demario
2010-12-23 21:29 ` [PATCH v5 " Sheldon Demario
2010-12-23 22:37 ` Johan Hedberg
2010-12-16 22:42 ` [PATCH " Brian Gix
2010-12-20 14:03 ` Claudio Takahasi
2010-12-15 19:54 ` [PATCH 3/5] Return an error if adapter_create_device fails Claudio Takahasi
2010-12-20 22:45 ` Claudio Takahasi
2010-12-15 19:54 ` [PATCH 4/5] Fix missing reply when create device is cancelled Claudio Takahasi
2010-12-20 22:47 ` [PATCH v2 " Claudio Takahasi
2010-12-20 23:00 ` Johan Hedberg
2010-12-15 19:54 ` [PATCH 5/5] Remove unneeded variable Claudio Takahasi
2010-12-20 22:49 ` [PATCH v2 " Claudio Takahasi
2010-12-20 23:02 ` Johan Hedberg
2010-12-21 12:03 ` Anderson Lizardo
2010-12-21 12:02 ` [PATCH v3] " Anderson Lizardo
2010-12-21 12:47 ` Johan Hedberg
2010-12-16 9:15 ` [PATCH 1/5] Implement cancel primary discovery session 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=20101220225909.GA6365@jh-x301 \
--to=johan.hedberg@gmail.com \
--cc=claudio.takahasi@openbossa.org \
--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