hal_initialize() overrides other filter/object/fallback functions on separate connection

Havoc Pennington hp at redhat.com
Sat Aug 7 17:24:51 PDT 2004


Hi,

Sorry to reply after you wrote a patch ;-)

A couple things here:

 1. DBusConnection has state, yes, but nothing that afaik should 
    cause one user of the connection to interfere with another.
    As long as the simple rule of ignoring a message that isn't
    interesting to you gets followed.

 2. Remember that filter functions are supposed to be a freakish
    thing you don't usually use, just like Xlib filter functions.
    libdbus is a low-level library meant to use in *implementing* 
    higher-level APIs.

That said, with some more careful explanation maybe get_dedicated() is
useful, but I'm not convinced yet.

A possible other way to do this is to have an address passed to
dbus_connection_open() that refers to a bus, e.g. instead of
unix:path=/tmp/foo maybe bus:type=system - this would not do any
communication/registration with the bus though, or maintain a global bus
connection, it would just open a connection and encapsulate the way to
find the bus address. (Env variable, etc.)

Havoc




More information about the dbus mailing list