2012-09-06 09:15:08

by Andrzej Kaczmarek

[permalink] [raw]
Subject: [PATCH] gatt: Fix reading Service Changed CCC

Find Information Request is only sent when there are no more attributes
following Service Changed Value (incorrect) and thus will never find CCC.
---
profiles/gatt/gas.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/profiles/gatt/gas.c b/profiles/gatt/gas.c
index ddd4e70..28d7fbf 100644
--- a/profiles/gatt/gas.c
+++ b/profiles/gatt/gas.c
@@ -245,7 +245,7 @@ static void gatt_characteristic_cb(GSList *characteristics, guint8 status,
start = chr->value_handle + 1;
end = gas->gatt.end;

- if (start <= end) {
+ if (start > end) {
error("Inconsistent database: Service Changed CCC missing");
return;
}
--
1.7.11.3



2012-09-06 14:02:43

by Johan Hedberg

[permalink] [raw]
Subject: Re: [PATCH] gatt: Fix reading Service Changed CCC

Hi Andrzej,

On Thu, Sep 06, 2012, Andrzej Kaczmarek wrote:
> Find Information Request is only sent when there are no more attributes
> following Service Changed Value (incorrect) and thus will never find CCC.
> ---
> profiles/gatt/gas.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

Applied. Thanks.

Johan

2012-09-06 13:59:03

by Claudio Takahasi

[permalink] [raw]
Subject: Re: [PATCH] gatt: Fix reading Service Changed CCC

Hi Andrzej:

On Thu, Sep 6, 2012 at 6:15 AM, Andrzej Kaczmarek
<[email protected]> wrote:
> Find Information Request is only sent when there are no more attributes
> following Service Changed Value (incorrect) and thus will never find CCC.
> ---
> profiles/gatt/gas.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/profiles/gatt/gas.c b/profiles/gatt/gas.c
> index ddd4e70..28d7fbf 100644
> --- a/profiles/gatt/gas.c
> +++ b/profiles/gatt/gas.c
> @@ -245,7 +245,7 @@ static void gatt_characteristic_cb(GSList *characteristics, guint8 status,
> start = chr->value_handle + 1;
> end = gas->gatt.end;
>
> - if (start <= end) {
> + if (start > end) {
> error("Inconsistent database: Service Changed CCC missing");
> return;
> }
> --
> 1.7.11.3
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html

ack!

Regards,
Claudio