* [PATCH] android/gatt: Set Descriptor handle and Include Service handle
@ 2014-11-17 10:30 Marcin Kraglak
2014-11-18 22:20 ` Szymon Janc
0 siblings, 1 reply; 2+ messages in thread
From: Marcin Kraglak @ 2014-11-17 10:30 UTC (permalink / raw)
To: linux-bluetooth
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;
--
1.9.3
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] android/gatt: Set Descriptor handle and Include Service handle
2014-11-17 10:30 [PATCH] android/gatt: Set Descriptor handle and Include Service handle Marcin Kraglak
@ 2014-11-18 22:20 ` Szymon Janc
0 siblings, 0 replies; 2+ messages in thread
From: Szymon Janc @ 2014-11-18 22:20 UTC (permalink / raw)
To: Marcin Kraglak; +Cc: linux-bluetooth
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-11-18 22:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).