Return-Path: MIME-Version: 1.0 In-Reply-To: <20180322100613.28536-1-szymon.janc@codecoup.pl> References: <20180322100613.28536-1-szymon.janc@codecoup.pl> From: Luiz Augusto von Dentz Date: Thu, 22 Mar 2018 12:28:20 +0200 Message-ID: Subject: Re: [PATCH v2] gatt: Mark Includes property of org.bluez.GattService1 as optional To: Szymon Janc Cc: "linux-bluetooth@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-bluetooth-owner@vger.kernel.org List-ID: Hi Szymon, On Thu, Mar 22, 2018 at 12:06 PM, Szymon Janc wrote: > If property is not present treat it as no Include Services present. > --- > doc/gatt-api.txt | 2 +- > src/gatt-database.c | 3 ++- > 2 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/doc/gatt-api.txt b/doc/gatt-api.txt > index f58de23c3..60a997cbf 100644 > --- a/doc/gatt-api.txt > +++ b/doc/gatt-api.txt > @@ -45,7 +45,7 @@ Properties string UUID [read-only] > belongs to. Only present on services from remote > devices. > > - array{object} Includes [read-only] > + array{object} Includes [read-only, optional] > > Array of object paths representing the included > services of this service. > diff --git a/src/gatt-database.c b/src/gatt-database.c > index c1ae91211..2e1c20d78 100644 > --- a/src/gatt-database.c > +++ b/src/gatt-database.c > @@ -1676,8 +1676,9 @@ static bool parse_includes(GDBusProxy *proxy, struct external_service *service) > DBusMessageIter array; > char *obj; > > + /* Includes property is optional */ > if (!g_dbus_proxy_get_property(proxy, "Includes", &iter)) > - return false; > + return true; > > if (dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_ARRAY) > return false; > -- > 2.14.3 Ive pushed a similar patch about an hour ago: https://git.kernel.org/pub/scm/bluetooth/bluez.git/commit/?id=4f7162071f885714f8a3aaedc50333576e2dd8f5 -- Luiz Augusto von Dentz