From: Johan Hedberg <johan.hedberg@gmail.com>
To: Andrzej Kaczmarek <andrzej.kaczmarek@tieto.com>
Cc: linux-bluetooth@vger.kernel.org, Rafal Garbat <rafal.garbat@tieto.com>
Subject: Re: [PATCH v6 06/13] heartrate: Read Body Sensor Location characteristics
Date: Fri, 21 Sep 2012 16:35:22 +0300 [thread overview]
Message-ID: <20120921133522.GA16944@x220> (raw)
In-Reply-To: <1348139690-26985-7-git-send-email-andrzej.kaczmarek@tieto.com>
Hi Andrzej,
On Thu, Sep 20, 2012, Andrzej Kaczmarek wrote:
> +static void read_sensor_location_cb(guint8 status, const guint8 *pdu,
> + guint16 len, gpointer user_data)
> +{
> + struct heartrate *hr = user_data;
> + uint8_t value;
> + ssize_t vlen;
> +
> + if (status != 0) {
> + error("Body Sensor Location read failed: %s",
> + att_ecode2str(status));
> + return;
> + }
> +
> + vlen = dec_read_resp(pdu, len, &value, sizeof(value));
> + if (vlen < 0) {
> + error("Protocol error");
> + return;
> + }
> +
> + if (vlen != 1) {
> + error("Invalid length for Body Sensor Location");
> + return;
> + }
Minor nitpick: vlen != sizeof(value) would make it more clear exactly
what you want to compare with.
Johan
next prev parent reply other threads:[~2012-09-21 13:35 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-20 11:14 [PATCH v6 00/13] Heart Rate Profile plugin Andrzej Kaczmarek
2012-09-20 11:14 ` [PATCH v6 01/13] Heart Rate Profile (HRP) client API Andrzej Kaczmarek
2012-09-20 11:14 ` [PATCH v6 02/13] heartrate: Add initial HRP client support Andrzej Kaczmarek
2012-09-20 11:14 ` [PATCH v6 03/13] heartrate: Add attio callbacks Andrzej Kaczmarek
2012-09-20 11:14 ` [PATCH v6 04/13] heartrate: Discover HRS characteristics Andrzej Kaczmarek
2012-09-20 11:14 ` [PATCH v6 05/13] heartrate: Discover Heart Rate Measurement CCC Andrzej Kaczmarek
2012-09-20 11:14 ` [PATCH v6 06/13] heartrate: Read Body Sensor Location characteristics Andrzej Kaczmarek
2012-09-21 13:35 ` Johan Hedberg [this message]
2012-09-20 11:14 ` [PATCH v6 07/13] heartrate: Add HeartRateManager interface Andrzej Kaczmarek
2012-09-21 13:39 ` Johan Hedberg
2012-09-20 11:14 ` [PATCH v6 08/13] heartrate: Add support to enable notifications Andrzej Kaczmarek
2012-09-21 13:42 ` Johan Hedberg
2012-09-20 11:14 ` [PATCH v6 09/13] heartrate: Process measurement notifications Andrzej Kaczmarek
2012-09-20 11:14 ` [PATCH v6 10/13] heartrate: Add support to reset Energy Expended Andrzej Kaczmarek
2012-09-20 11:14 ` [PATCH v6 11/13] heartrate: Add GetProperties method Andrzej Kaczmarek
2012-09-21 13:45 ` Johan Hedberg
2012-09-20 11:14 ` [PATCH v6 12/13] heartrate: Add HeartRateWatcher interface to default policy Andrzej Kaczmarek
2012-09-20 11:14 ` [PATCH v6 13/13] heartrate: Add test script Andrzej Kaczmarek
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=20120921133522.GA16944@x220 \
--to=johan.hedberg@gmail.com \
--cc=andrzej.kaczmarek@tieto.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=rafal.garbat@tieto.com \
/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).