dbus_g_bus_get return value

Leonardo Boiko leoboiko at conectiva.com.br
Tue Oct 5 15:17:51 UTC 2004


This is from the D-BUS tutorial:
     connection = dbus_g_bus_get(DBUS_BUS_SYSTEM, &error);
     if (connection == NULL) {

When I run it, I have the following situation:
     16  connection = dbus_g_bus_get(DBUS_BUS_SESSION, &error);
     (gdb)
     17  if (connection == NULL) {
     (gdb) p *error
     $1 = {domain = 46, code = 0,
     message = 0x804d750 "D-BUS error org.freedesktop.DBus.Error.Failed:
     Unable to determine the address of the message bus"}
     (gdb) p connection
     $2 = (DBusGConnection *) 0x4

Maybe instead of "connection == NULL" it should check for
"error != NULL"?
-- 
Leonardo Boiko
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
Url : http://freedesktop.org/pipermail/dbus/attachments/20041005/32166252/signature.pgp


More information about the dbus mailing list