dbus_bus_get versus dbus_connection_open

"Jérôme M. Berger" jeberger at free.fr
Sat Sep 22 15:09:10 PDT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

	Hi,

	I'm trying to use dbus with a main loop. I have registered the
appropriate callbacks (watch, timeout, wakeup, and dispatch), but I
have a problem:

 - if I open a connection to my session bus using
dbus_connection_open and dbus_bus_register and the bus address taken
from $DBUS_SESSION_BUS_ADDRESS, everything works fine;

 - but if I open the connection using dbus_bus_get it doesn't work.

	I've done some digging and the difference appears to be that in the
second case my dispatch_status function does not get called. As a
workaround, I tried calling it myself from my I/O event handler
(just after calling dbus_watch_handle) and this makes it work. But
what I don't understand is why there is a difference between calling
dbus_bus_get and calling dbus_connection_open + dbus_bus_register.
I've tried looking in the dbus code, but I haven't seen anything
that could explain the difference. Can somebody tell me what goes
wrong please?

	Thank you,
		Jerome
- --
+------------------------- Jerome M. BERGER ---------------------+
|    mailto:jeberger at free.fr      | ICQ:    238062172            |
|    http://jeberger.free.fr/     | Jabber: jeberger at jabber.fr   |
+---------------------------------+------------------------------+
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)

iD8DBQFG9ZKGd0kWM4JG3k8RAo9iAJ9MD0KUIFus89x8fBXQKlqqZpRZ7gCfUhG/
jcTdo9EoDOfadw2UtX5M3jA=
=3nKl
-----END PGP SIGNATURE-----


More information about the dbus mailing list