From: Szymon Janc <szymon.janc@tieto.com>
To: Jakub Tyszkowski <jakub.tyszkowski@tieto.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH 1/2] android/gatt: Fix server send response status value
Date: Thu, 11 Dec 2014 18:55:39 +0100 [thread overview]
Message-ID: <2458956.8XeFMp2OEh@leonov> (raw)
In-Reply-To: <1418318213-23944-1-git-send-email-jakub.tyszkowski@tieto.com>
Hi Jakub,
On Thursday 11 of December 2014 18:16:52 Jakub Tyszkowski wrote:
> Cast status to uint8_t, due to (byte) cast in java layer.
> ---
> android/gatt.c | 14 ++++++++------
> 1 file changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/android/gatt.c b/android/gatt.c
> index 84fba64..64163f8 100644
> --- a/android/gatt.c
> +++ b/android/gatt.c
> @@ -5551,7 +5551,8 @@ static void handle_server_send_response(const void
> *buf, uint16_t len) * gatt_db_attribute_write().
> */
> req = queue_peek_head(conn->device->pending_requests);
> - req->error = err_to_att(cmd->status);
> + /* Cast status to uint8_t, due to (byte) cast in java layer. */
> + req->error = err_to_att((uint8_t)cmd->status);
> req->state = REQUEST_DONE;
>
> /*
> @@ -5560,15 +5561,16 @@ static void handle_server_send_response(const void
> *buf, uint16_t len) */
> }
>
> + /* Cast status to uint8_t, due to (byte) cast in java layer. */
> if (transaction->opcode < ATT_OP_WRITE_REQ)
> gatt_db_attribute_read_result(transaction->attrib,
> - transaction->serial_id,
> - err_to_att(cmd->status),
> - cmd->data, cmd->len);
> + transaction->serial_id,
> + err_to_att((uint8_t)cmd->status),
> + cmd->data, cmd->len);
> else
> gatt_db_attribute_write_result(transaction->attrib,
> - transaction->serial_id,
> - err_to_att(cmd->status));
> + transaction->serial_id,
> + err_to_att((uint8_t)cmd->status));
>
> send_dev_complete_response(conn->device, transaction->opcode);
Applied (after fixing some code style issues), thanks.
--
BR
Szymon Janc
prev parent reply other threads:[~2014-12-11 17:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-11 17:16 [PATCH 1/2] android/gatt: Fix server send response status value Jakub Tyszkowski
2014-12-11 17:16 ` [PATCH 2/2] android/pts: Update gatt server status Jakub Tyszkowski
2014-12-11 17:55 ` Szymon Janc [this message]
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=2458956.8XeFMp2OEh@leonov \
--to=szymon.janc@tieto.com \
--cc=jakub.tyszkowski@tieto.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 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).