From: Szymon Janc <szymon.janc@tieto.com>
To: Marcin Kraglak <marcin.kraglak@tieto.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] android/gatt: Set Descriptor handle and Include Service handle
Date: Tue, 18 Nov 2014 23:20:18 +0100 [thread overview]
Message-ID: <19950456.7PV9tDReLT@leonov> (raw)
In-Reply-To: <1416220254-9349-1-git-send-email-marcin.kraglak@tieto.com>
Hi Marcin,
On Monday 17 of November 2014 11:30:54 Marcin Kraglak wrote:
> Set newly created attribute's handle in notification data.
> ---
> android/gatt.c | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/android/gatt.c b/android/gatt.c
> index 086bb94..199243d 100644
> --- a/android/gatt.c
> +++ b/android/gatt.c
> @@ -4322,6 +4322,7 @@ static void handle_server_add_included_service(const
> void *buf, uint16_t len) goto failed;
> }
>
> + ev.incl_srvc_handle = gatt_db_attribute_get_handle(service);
> status = HAL_STATUS_SUCCESS;
> failed:
> ev.srvc_handle = cmd->service_handle;
> @@ -5056,10 +5057,13 @@ static void handle_server_add_descriptor(const void
> *buf, uint16_t len) attrib = gatt_db_service_add_descriptor(attrib, &uuid,
> permissions, read_cb, write_cb,
> INT_TO_PTR(app_id));
> - if (!attrib)
> + if (!attrib) {
> status = HAL_STATUS_FAILED;
> - else
> - status = HAL_STATUS_SUCCESS;
> + goto failed;
> + }
> +
> + ev.descr_handle = gatt_db_attribute_get_handle(attrib);
> + status = HAL_STATUS_SUCCESS;
>
> failed:
> ev.server_if = app_id;
Applied, thanks.
--
BR
Szymon Janc
prev parent reply other threads:[~2014-11-18 22:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-17 10:30 [PATCH] android/gatt: Set Descriptor handle and Include Service handle Marcin Kraglak
2014-11-18 22:20 ` 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=19950456.7PV9tDReLT@leonov \
--to=szymon.janc@tieto.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=marcin.kraglak@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).