From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: <1511301906.16347.42.camel@hadess.net> Subject: Re: [PATCH BlueZ] gdbus: Fix not emiting PropertiesChanged From: Bastien Nocera To: Luiz Augusto von Dentz , linux-bluetooth@vger.kernel.org Date: Tue, 21 Nov 2017 23:05:06 +0100 In-Reply-To: <20171121200436.17576-1-luiz.dentz@gmail.com> References: <20171121200436.17576-1-luiz.dentz@gmail.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Sender: linux-bluetooth-owner@vger.kernel.org List-ID: > Re: [PATCH BlueZ] gdbus: Fix not emiting PropertiesChanged emitting. On Tue, 2017-11-21 at 22:04 +0200, Luiz Augusto von Dentz wrote: > From: Luiz Augusto von Dentz > > If and interface is removed while properties are pending it would cause "an interface". > process_properties_from_interface to clear data->pending_prop when it > should only clear the iface->pending_prop. I prefer my version, which allows the pending properties to be cleared out if the pending ones were for that interface. I also prefer the subject line I used, describing the actual problem it fixes, and the commit message going more into details. But up to you. Cheers > --- > gdbus/object.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/gdbus/object.c b/gdbus/object.c > index afb458764..5c8ad7a55 100644 > --- a/gdbus/object.c > +++ b/gdbus/object.c > @@ -1659,8 +1659,6 @@ static void > process_properties_from_interface(struct generic_data *data, > DBusMessageIter iter, dict, array; > GSList *invalidated; > > - data->pending_prop = FALSE; > - > if (iface->pending_prop == NULL) > return; > > @@ -1722,6 +1720,8 @@ static void process_property_changes(struct > generic_data *data) > { > GSList *l; > > + data->pending_prop = FALSE; > + > for (l = data->interfaces; l != NULL; l = l->next) { > struct interface_data *iface = l->data; >