linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] android/gatt: Fix passing wrong event len in le dev found
@ 2014-04-02 11:36 Grzegorz Kolodziejczyk
  2014-04-02 12:51 ` Szymon Janc
  0 siblings, 1 reply; 2+ messages in thread
From: Grzegorz Kolodziejczyk @ 2014-04-02 11:36 UTC (permalink / raw)
  To: linux-bluetooth

This fix wrong notification length passing to ipc.
---
 android/gatt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/android/gatt.c b/android/gatt.c
index 8bd7028..5069f98 100644
--- a/android/gatt.c
+++ b/android/gatt.c
@@ -604,7 +604,7 @@ static void le_device_found_handler(const bdaddr_t *addr, uint8_t addr_type,
 
 	ipc_send_notif(hal_ipc, HAL_SERVICE_ID_GATT,
 						HAL_EV_GATT_CLIENT_SCAN_RESULT,
-						sizeof(ev) + ev->len, ev);
+						sizeof(*ev) + ev->len, ev);
 
 connect:
 	if (!is_device_wating_for_connect(addr, addr_type))
-- 
1.9.1


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

* Re: [PATCH] android/gatt: Fix passing wrong event len in le dev found
  2014-04-02 11:36 [PATCH] android/gatt: Fix passing wrong event len in le dev found Grzegorz Kolodziejczyk
@ 2014-04-02 12:51 ` Szymon Janc
  0 siblings, 0 replies; 2+ messages in thread
From: Szymon Janc @ 2014-04-02 12:51 UTC (permalink / raw)
  To: Grzegorz Kolodziejczyk; +Cc: linux-bluetooth

Hi Grzegorz,

On Wednesday 02 of April 2014 13:36:57 Grzegorz Kolodziejczyk wrote:
> This fix wrong notification length passing to ipc.
> ---
>  android/gatt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/android/gatt.c b/android/gatt.c
> index 8bd7028..5069f98 100644
> --- a/android/gatt.c
> +++ b/android/gatt.c
> @@ -604,7 +604,7 @@ static void le_device_found_handler(const bdaddr_t *addr, uint8_t addr_type,
>  
>  	ipc_send_notif(hal_ipc, HAL_SERVICE_ID_GATT,
>  						HAL_EV_GATT_CLIENT_SCAN_RESULT,
> -						sizeof(ev) + ev->len, ev);
> +						sizeof(*ev) + ev->len, ev);
>  
>  connect:
>  	if (!is_device_wating_for_connect(addr, addr_type))
> 

Patch applied, thanks.

I've also fixed missing length checks on HAL side.

-- 
Best regards, 
Szymon Janc

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

end of thread, other threads:[~2014-04-02 12:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-02 11:36 [PATCH] android/gatt: Fix passing wrong event len in le dev found Grzegorz Kolodziejczyk
2014-04-02 12:51 ` 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).