Clarification on some bus behaviour

Havoc Pennington hp at
Wed Sep 8 11:34:43 PDT 2010


On Wed, Sep 8, 2010 at 5:56 AM, Thiago Macieira <thiago at> wrote:
> dbus_bus_add_match("destination='insert my own unique connection here'");

I never would have imagined this one was needed - match rules are
intended for "signals and eavesdropping only" I think.

> dbus_bus_add_match("type='signal',sender='org.freedesktop.DBus',member='NameAcquired'");

This is kind of inconsistent and unclear, but it looks to me (from the
implementation) is that NameAcquired doesn't go through match rules at
all... I'm not sure you could even eavesdrop it. As a practical
matter, this is probably for the best. The spec ought to describe it

> dbus_bus_add_match("type='signal',sender='org.freedesktop.DBus',interface='org.freedesktop.DBus',member='NameOwnerChanged',arg0='org.freedesktop.DBus'");
> blocking call to GetNameOwner("org.freedesktop.DBus")

I think the spec should require that the unique name of
org.freedesktop.DBus is org.freedesktop.DBus also. Don't see why it
should be able to change.

> dbus_bus_add_match("type='signal',sender='org.freedesktop.DBus',member='NameLost'");

And then this should be unnecessary too.

> Now, the interesting thing is that, with the reference implementation of the
> dbus-daemon, I *know* that all of the above are useless. These calls are there
> because my reading of the spec tells me that they are necessary.

Right. I say fix the spec. The implementation is right, and leaving
any of this undefined is just annoying and has no value.


More information about the dbus mailing list