dbus_g_bus_get and error reporting
Havoc Pennington
hp at redhat.com
Wed Aug 18 11:28:17 PDT 2004
On Wed, 2004-08-18 at 01:47, Paul Kuliniewicz wrote:
> I've noticed that dbus_g_bus_get() in CVS behaves a bit unexpectedly
> when it fails. It's intuitive to expect it to return NULL on failure,
> but it actually returns 4 -- the result of
> DBUS_G_CONNECTION_FROM_CONNECTION(NULL).
Oops. ;-) DBUS_G_CONNECTION_FROM_CONNECTION() should probably
special-case NULL to keep the value at NULL. This is really just a
debugging aid to catch any mixing between the G and non-G datatype.
> And while we're on the subject, does anyone know what would make
> test-service-glib (after being corrected for the above) fail with the
> following error message?
>
> Failed to open connection to bus: D-BUS error
> org.freedesktop.DBus.Error.Disconnected: Disconnected prior to receiving
> a reply
Don't know offhand, but if you set the env variable for verbose output
(DBUS_VERBOSE=1 I think) for the _bus_ (not the client side) it will
probably have the answer in there somewhere.
Havoc
More information about the dbus
mailing list