Re: Parameter offset is not used in the WriteValue dbus method

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

 



Hi Michael,

On Mon, Oct 16, 2017 at 12:49 PM, Michael Simon
<michael.simon.at@xxxxxxxxx> wrote:
> Hi,
>
> we are developing an bluetooth le application using the bluez dbus interface.
> We noticed that in the write calls for characteristics and describtors
> the optional offset parameter was not used.
> We fixed the problem, the glib iterator was not moved to the second
> array in which the offset parameter is stored.
>
> We created the following patch (previous commit was
> b5fbb08a56aaf391d1393f2efdf349e8fc173cb9 from Thu Oct 5 12:51:38
> 2017):
> ---
>  src/gatt-client.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/src/gatt-client.c b/src/gatt-client.c
> index 32b3a87..58f14b8 100644
> --- a/src/gatt-client.c
> +++ b/src/gatt-client.c
> @@ -596,6 +596,8 @@ static DBusMessage
> *descriptor_write_value(DBusConnection *conn,
>      if (parse_value_arg(&iter, &value, &value_len))
>          return btd_error_invalid_args(msg);
>
> +        dbus_message_iter_next (&iter);
> +
>      if (parse_options(&iter, &offset))
>          return btd_error_invalid_args(msg);
>
> @@ -986,6 +988,8 @@ static DBusMessage
> *characteristic_write_value(DBusConnection *conn,
>      if (parse_value_arg(&iter, &value, &value_len))
>          return btd_error_invalid_args(msg);
>
> +        dbus_message_iter_next (&iter);
> +
>      if (parse_options(&iter, &offset))
>          return btd_error_invalid_args(msg);
>
> --
> 2.7.4
>
> This patch fixed the problem for us, maybe it is usefull for you too.

Patch looks valid, but could you please send it in a proper format:

https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/HACKING#n104

-- 
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