From: Denis Kenzior <denkenz@gmail.com>
To: ell@lists.01.org
Subject: Re: [PATCH 2/5] dbus: Coalesce PropertiesChanged signals
Date: Mon, 29 Feb 2016 09:43:49 -0600 [thread overview]
Message-ID: <56D46735.5070105@gmail.com> (raw)
In-Reply-To: <CAOq732+Ai=m+BVD6xxhip+CezQ8Um8rR5ehkAQVw-=US6bf+Aw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1929 bytes --]
Hi Andrew,
On 02/29/2016 03:21 AM, Andrzej Zaborowski wrote:
> Hi Denis,
>
> On 26 February 2016 at 21:30, Denis Kenzior <denkenz@gmail.com> wrote:
>> On 02/17/2016 09:20 PM, Andrew Zaborowski wrote:
>>> if (!property)
>>> return false;
>>>
>>> - signature = property->metainfo + strlen(property->metainfo) + 1;
>>> -
>>> - if (instance->interface->handle_old_style_properties) {
>>> - signal = l_dbus_message_new_signal(dbus, path,
>>> - interface_name,
>>> -
>>> "PropertyChanged");
>>> + rec = l_queue_find(tree->property_changes,
>>> + match_property_changes_instance,
>>> instance);
>>>
The l_queue_find call only takes the instance into consideration, not
the object pointer.
>>> - builder = l_dbus_message_builder_new(signal);
>>> -
>>> - l_dbus_message_builder_append_basic(builder, 's',
>>> - property_name);
>>> - l_dbus_message_builder_enter_variant(builder, signature);
>>
>>
>> This looks a bit suspicious. Should we be also comparing the object
>> pointer, not just the instance pointer here?
>
> Assuming that only one object can have the instance it shouldn't
> matter. When the object or the instance are removed, the property
> change record is also removed so it won't accidentally point at a
> different instance.
>
> We also rely on that for the interface added notifications.
>
What about multiple objects with the same interface?
E.g. org.foo.Foobar interface on /bar1 and /bar2. If Foobar.Baz
property changes on /bar1 and /bar2.
Alternatively, if Foobar.Baz1 changes on /bar1, and Foobar.Baz2 changes
on /bar2, you can also get into a weird situation.
Or am I missing something?
Regards,
-Denis
next prev parent reply other threads:[~2016-02-29 15:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-18 3:20 [PATCH 1/5] dbus: Coalesce InterfacesAdded/Removed signals Andrew Zaborowski
2016-02-18 3:20 ` [PATCH 2/5] dbus: Coalesce PropertiesChanged signals Andrew Zaborowski
2016-02-26 20:30 ` Denis Kenzior
2016-02-29 9:21 ` Andrzej Zaborowski
2016-02-29 15:43 ` Denis Kenzior [this message]
2016-02-29 21:26 ` Denis Kenzior
2016-02-18 3:20 ` [PATCH 3/5] dbus: Move standard interface name defines to public header Andrew Zaborowski
2016-02-18 3:20 ` [PATCH 4/5] examples: dbus-service: Use interface name macros Andrew Zaborowski
2016-02-18 3:20 ` [PATCH 5/5] unit: Update PropertyChanged value check Andrew Zaborowski
2016-02-26 20:27 ` [PATCH 1/5] dbus: Coalesce InterfacesAdded/Removed signals Denis Kenzior
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56D46735.5070105@gmail.com \
--to=denkenz@gmail.com \
--cc=ell@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.