Re: [PATCH BlueZ 2/2] core: gatt: Fix incorrect response on CCC read

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Arman,

On Thu, Feb 19, 2015 at 2:12 AM, Arman Uguray <armansito@xxxxxxxxxxxx> wrote:
> This patch fixes a bug where a CCC read on the local GATT server always
> returned a 0-length value.
> ---
>  src/gatt-database.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/gatt-database.c b/src/gatt-database.c
> index 5e83ce1..e876141 100644
> --- a/src/gatt-database.c
> +++ b/src/gatt-database.c
> @@ -495,7 +495,7 @@ static void gatt_ccc_read_cb(struct gatt_db_attribute *attrib,
>                 goto done;
>         }
>
> -       len -= offset;
> +       len = 2 - offset;
>         value = len ? &ccc->value[offset] : NULL;
>
>  done:
> @@ -517,7 +517,7 @@ static void gatt_ccc_write_cb(struct gatt_db_attribute *attrib,
>
>         handle = gatt_db_attribute_get_handle(attrib);
>
> -       DBG("CCC read called for handle: 0x%04x", handle);
> +       DBG("CCC write called for handle: 0x%04x", handle);
>
>         if (!value || len != 2) {
>                 ecode = BT_ATT_ERROR_INVALID_ATTRIBUTE_VALUE_LEN;
> --
> 2.2.0.rc0.207.ga3a616c

Applied, thanks.


-- 
Luiz Augusto von Dentz
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux