From: Johan Hedberg <johan.hedberg@gmail.com>
To: Anderson Lizardo <anderson.lizardo@openbossa.org>
Cc: linux-bluetooth@vger.kernel.org,
Claudio Takahasi <claudio.takahasi@openbossa.org>
Subject: Re: [PATCH v2 BlueZ 5/8] attrib: Fix missing Discovery reply when disconnected
Date: Fri, 30 Mar 2012 13:23:04 +0300 [thread overview]
Message-ID: <20120330102304.GA9799@x220> (raw)
In-Reply-To: <1332881029-1732-6-git-send-email-anderson.lizardo@openbossa.org>
Hi,
On Tue, Mar 27, 2012, Anderson Lizardo wrote:
> From: Claudio Takahasi <claudio.takahasi@openbossa.org>
>
> This patch fixes missing reply for DiscoverCharacteristics method on
> Generic Attribute. If link is disconnected reply message is not sent.
> ---
> attrib/client.c | 14 ++++++++++++++
> 1 files changed, 14 insertions(+), 0 deletions(-)
I've applied the first four patches but there was something in this one
that bothered me:
> diff --git a/attrib/client.c b/attrib/client.c
> index ce78ed6..57cd028 100644
> --- a/attrib/client.c
> +++ b/attrib/client.c
> @@ -356,6 +356,20 @@ static void attio_disconnected(gpointer user_data)
> {
> struct gatt_service *gatt = user_data;
>
> + if (gatt->query) {
> + if (gatt->query->msg) {
> + DBusMessage *reply;
> +
> + reply = btd_error_failed(gatt->query->msg,
> + strerror(ECONNRESET));
What's the point of picking a POSIX error and using its glibc string
translation here? Why don't you provide your own string instead which
can be much more understandable for someone who reads the logs, e.g.
"Attribute IO got disconnected" or whatever makes more sense.
Johan
next prev parent reply other threads:[~2012-03-30 10:23 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-21 17:00 [PATCH BlueZ 0/8] Generic GATT client fixes Anderson Lizardo
2012-03-21 17:00 ` [PATCH BlueZ 1/8] attrib: Centralize ATTIO connection management Anderson Lizardo
2012-03-21 17:00 ` [PATCH BlueZ 2/8] attrib: Discover Characteristics if already connected Anderson Lizardo
2012-03-21 17:00 ` [PATCH BlueZ 3/8] attrib: Move Characteristic Discovery reply to a new function Anderson Lizardo
2012-03-21 17:00 ` [PATCH BlueZ 4/8] attrib: Register only new characteristics found Anderson Lizardo
2012-03-21 17:00 ` [PATCH BlueZ 5/8] attrib: Fix missing Discovery reply when disconnected Anderson Lizardo
2012-03-21 17:00 ` [PATCH BlueZ 6/8] attrib: Fix missing D-Bus message unref on DiscoverCharacteristics Anderson Lizardo
2012-03-21 17:00 ` [PATCH BlueZ 7/8] attrib: Attempt to remove attio callback on watcher exit Anderson Lizardo
2012-03-21 17:00 ` [PATCH BlueZ 8/8] gattrib: Protect GAttrib when there is a pending write Anderson Lizardo
2012-03-27 20:43 ` [PATCH v2 BlueZ 0/8] Generic GATT client fixes Anderson Lizardo
2012-03-27 20:43 ` [PATCH v2 BlueZ 1/8] attrib: Centralize ATTIO connection management Anderson Lizardo
2012-03-27 20:43 ` [PATCH v2 BlueZ 2/8] attrib: Discover Characteristics if already connected Anderson Lizardo
2012-03-27 20:43 ` [PATCH v2 BlueZ 3/8] attrib: Move Characteristic Discovery reply to a new function Anderson Lizardo
2012-03-27 20:43 ` [PATCH v2 BlueZ 4/8] attrib: Register only new characteristics found Anderson Lizardo
2012-03-27 20:43 ` [PATCH v2 BlueZ 5/8] attrib: Fix missing Discovery reply when disconnected Anderson Lizardo
2012-03-30 10:23 ` Johan Hedberg [this message]
2012-03-27 20:43 ` [PATCH v2 BlueZ 6/8] attrib: Fix missing D-Bus message unref on DiscoverCharacteristics Anderson Lizardo
2012-03-27 20:43 ` [PATCH v2 BlueZ 7/8] attrib: Attempt to remove attio callback on watcher exit Anderson Lizardo
2012-03-27 20:43 ` [PATCH v2 BlueZ 8/8] gattrib: Protect GAttrib when there is a pending write Anderson Lizardo
2012-03-30 10:25 ` Johan Hedberg
2012-04-02 13:56 ` Anderson Lizardo
2012-04-02 13:56 ` [PATCH v3 BlueZ 0/2] Generic GATT client fixes Anderson Lizardo
2012-04-02 13:56 ` [PATCH v3 BlueZ 1/2] attrib: Fix missing Discovery reply when disconnected Anderson Lizardo
2012-04-02 13:56 ` [PATCH v3 BlueZ 2/2] gattrib: Protect GAttrib when there is a pending write Anderson Lizardo
2012-04-03 11:19 ` [PATCH v3 BlueZ 0/2] Generic GATT client fixes 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=20120330102304.GA9799@x220 \
--to=johan.hedberg@gmail.com \
--cc=anderson.lizardo@openbossa.org \
--cc=claudio.takahasi@openbossa.org \
--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;
as well as URLs for NNTP newsgroup(s).