2013-02-07 17:40:31

by Vinicius Costa Gomes

[permalink] [raw]
Subject: [PATCH BlueZ] gdbus: Fix missing PropertiesChanged signal

If D-Bus ObjectManager is not supported, InterfacesAdded signal
checking needs to be ignored otherwise PropertiesChanged signal
will never be sent.
---
gdbus/object.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/gdbus/object.c b/gdbus/object.c
index 0c11246..43fb1f0 100644
--- a/gdbus/object.c
+++ b/gdbus/object.c
@@ -1701,8 +1701,11 @@ void g_dbus_emit_property_changed(DBusConnection *connection,
if (iface == NULL)
return;

- /* Don't emit property changed if interface is not yet published */
- if (g_slist_find(data->added, iface))
+ /*
+ * If ObjectManager is attached, don't emit property changed if
+ * interface is not yet published
+ */
+ if (root && g_slist_find(data->added, iface))
return;

property = find_property(iface->properties, name);
--
1.8.1.2



2013-02-14 14:02:38

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: Re: [PATCH BlueZ] gdbus: Fix missing PropertiesChanged signal

Hi Vinicius,

On Thu, Feb 7, 2013 at 7:40 PM, Vinicius Costa Gomes
<[email protected]> wrote:
> If D-Bus ObjectManager is not supported, InterfacesAdded signal
> checking needs to be ignored otherwise PropertiesChanged signal
> will never be sent.
> ---
> gdbus/object.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/gdbus/object.c b/gdbus/object.c
> index 0c11246..43fb1f0 100644
> --- a/gdbus/object.c
> +++ b/gdbus/object.c
> @@ -1701,8 +1701,11 @@ void g_dbus_emit_property_changed(DBusConnection *connection,
> if (iface == NULL)
> return;
>
> - /* Don't emit property changed if interface is not yet published */
> - if (g_slist_find(data->added, iface))
> + /*
> + * If ObjectManager is attached, don't emit property changed if
> + * interface is not yet published
> + */
> + if (root && g_slist_find(data->added, iface))
> return;
>
> property = find_property(iface->properties, name);
> --
> 1.8.1.2

Applied, thanks.


--
Luiz Augusto von Dentz