2016-09-21 19:32:25

by Alexander Aring

[permalink] [raw]
Subject: [BlueZ] tests: example-gatt-server: change GATT_CHRC_IFACE

This patch changes GATT_CHRC_IFACE to GATT_DESC_IFACE. The example
do not test this case and this is the reason why nobody detected it yet.

Cc: Szymon Janc <[email protected]>
Suggested-by: Florent Revest <[email protected]>
Signed-off-by: Alexander Aring <[email protected]>
---
Florent Revest reported this via irc and I put my "send-patches" hat on
to send this fix to mainline.

Review carefully, not tested in any case.

test/example-gatt-server | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/example-gatt-server b/test/example-gatt-server
index 44ceb70..bac1687 100755
--- a/test/example-gatt-server
+++ b/test/example-gatt-server
@@ -234,7 +234,7 @@ class Descriptor(dbus.service.Object):
if interface != GATT_DESC_IFACE:
raise InvalidArgsException()

- return self.get_properties()[GATT_CHRC_IFACE]
+ return self.get_properties()[GATT_DESC_IFACE]

@dbus.service.method(GATT_DESC_IFACE,
in_signature='a{sv}',
--
2.9.3



2016-09-22 08:11:40

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: Re: [BlueZ] tests: example-gatt-server: change GATT_CHRC_IFACE

Hi Alex,

On Wed, Sep 21, 2016 at 10:32 PM, Alexander Aring <[email protected]> wrote:
> This patch changes GATT_CHRC_IFACE to GATT_DESC_IFACE. The example
> do not test this case and this is the reason why nobody detected it yet.
>
> Cc: Szymon Janc <[email protected]>
> Suggested-by: Florent Revest <[email protected]>
> Signed-off-by: Alexander Aring <[email protected]>
> ---
> Florent Revest reported this via irc and I put my "send-patches" hat on
> to send this fix to mainline.
>
> Review carefully, not tested in any case.
>
> test/example-gatt-server | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/test/example-gatt-server b/test/example-gatt-server
> index 44ceb70..bac1687 100755
> --- a/test/example-gatt-server
> +++ b/test/example-gatt-server
> @@ -234,7 +234,7 @@ class Descriptor(dbus.service.Object):
> if interface != GATT_DESC_IFACE:
> raise InvalidArgsException()
>
> - return self.get_properties()[GATT_CHRC_IFACE]
> + return self.get_properties()[GATT_DESC_IFACE]
>
> @dbus.service.method(GATT_DESC_IFACE,
> in_signature='a{sv}',
> --
> 2.9.3

Applied, note that I reworded it a little bit and removed the
Signed-off-by, etc, as we don't use that in userspace.

--
Luiz Augusto von Dentz