Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH 1/2] android/gatt: Fix caching included services descriptors
@ 2014-04-14 10:39 Jakub Tyszkowski
  2014-04-14 10:39 ` [PATCH 2/2] android/gatt: Minor whitespace fixes Jakub Tyszkowski
  2014-04-16  8:26 ` [PATCH 1/2] android/gatt: Fix caching included services descriptors Szymon Janc
  0 siblings, 2 replies; 3+ messages in thread
From: Jakub Tyszkowski @ 2014-04-14 10:39 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Jakub Tyszkowski

---
 android/gatt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/android/gatt.c b/android/gatt.c
index 004063c..f303aea 100644
--- a/android/gatt.c
+++ b/android/gatt.c
@@ -1839,7 +1839,7 @@ static bool build_descr_cache(int32_t conn_id, struct gatt_device *dev,
 
 	/* Clip range to given characteristic */
 	start = ch->ch.value_handle + 1;
-	end = srvc->prim.range.end;
+	end = srvc->primary ? srvc->prim.range.end : srvc->incl.range.end;
 
 	/* Use next characteristic start as end. If there is none -
 	 * service end is valid end.
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] android/gatt: Minor whitespace fixes
  2014-04-14 10:39 [PATCH 1/2] android/gatt: Fix caching included services descriptors Jakub Tyszkowski
@ 2014-04-14 10:39 ` Jakub Tyszkowski
  2014-04-16  8:26 ` [PATCH 1/2] android/gatt: Fix caching included services descriptors Szymon Janc
  1 sibling, 0 replies; 3+ messages in thread
From: Jakub Tyszkowski @ 2014-04-14 10:39 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Jakub Tyszkowski

---
 android/gatt.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/android/gatt.c b/android/gatt.c
index f303aea..150f7b5 100644
--- a/android/gatt.c
+++ b/android/gatt.c
@@ -1249,7 +1249,7 @@ static void handle_client_disconnect(const void *buf, uint16_t len)
 		goto reply;
 	}
 
-	/*Check if client owns this connection */
+	/* Check if client owns this connection */
 	if (!queue_remove_if(dev->clients, match_by_value,
 						INT_TO_PTR(cmd->client_if))) {
 		error("gatt: cannot remove conn_id=%d", cmd->client_if);
@@ -1269,7 +1269,8 @@ reply:
 	 * device then this is what we shall to do.
 	 * If this is last client, this is still OK to do because on connect
 	 * request we do le scan and wait until remote device start
-	 * advertisement */
+	 * advertisement
+	 */
 	send_client_disconnect_notify(cmd->client_if, dev, GATT_SUCCESS);
 
 	/* If there is more clients just return */
@@ -1336,7 +1337,7 @@ static void handle_client_search_service(const void *buf, uint16_t len)
 		goto reply;
 	}
 
-	/*TODO:  Handle filter uuid */
+	/* TODO:  Handle filter uuid */
 
 	/* Use cache if possible */
 	if (!queue_isempty(dev->services)) {
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] android/gatt: Fix caching included services descriptors
  2014-04-14 10:39 [PATCH 1/2] android/gatt: Fix caching included services descriptors Jakub Tyszkowski
  2014-04-14 10:39 ` [PATCH 2/2] android/gatt: Minor whitespace fixes Jakub Tyszkowski
@ 2014-04-16  8:26 ` Szymon Janc
  1 sibling, 0 replies; 3+ messages in thread
From: Szymon Janc @ 2014-04-16  8:26 UTC (permalink / raw)
  To: Jakub Tyszkowski; +Cc: linux-bluetooth

Hi Jakub,

On Monday 14 of April 2014 12:39:50 Jakub Tyszkowski wrote:
> ---
>  android/gatt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/android/gatt.c b/android/gatt.c
> index 004063c..f303aea 100644
> --- a/android/gatt.c
> +++ b/android/gatt.c
> @@ -1839,7 +1839,7 @@ static bool build_descr_cache(int32_t conn_id, struct gatt_device *dev,
>  
>  	/* Clip range to given characteristic */
>  	start = ch->ch.value_handle + 1;
> -	end = srvc->prim.range.end;
> +	end = srvc->primary ? srvc->prim.range.end : srvc->incl.range.end;
>  
>  	/* Use next characteristic start as end. If there is none -
>  	 * service end is valid end.
> 

Both patches applied, thanks.

-- 
Best regards, 
Szymon Janc

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-04-16  8:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-14 10:39 [PATCH 1/2] android/gatt: Fix caching included services descriptors Jakub Tyszkowski
2014-04-14 10:39 ` [PATCH 2/2] android/gatt: Minor whitespace fixes Jakub Tyszkowski
2014-04-16  8:26 ` [PATCH 1/2] android/gatt: Fix caching included services descriptors Szymon Janc

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox