GDBus: Properly handle empty address strings
authorDavid Zeuthen <davidz@redhat.com>
Tue, 6 Jul 2010 17:56:35 +0000 (13:56 -0400)
committerDavid Zeuthen <davidz@redhat.com>
Tue, 6 Jul 2010 21:03:36 +0000 (17:03 -0400)
commitef296440630ca01a8bc0a9dc58722bf1d6dc1ab7
treede721461abf8978c875c7de61abce8af01078701
parentf0b6cbb13951549b9e17ee0366fc5be3e4b69f2f
GDBus: Properly handle empty address strings

Changes this error

 DBUS_SESSION_BUS_ADDRESS= \
 gdbus introspect --session \
                  --dest org.freedesktop.DBus \
                  --object-path /org/freedesktop/DBus
 **
 GLib-GIO:ERROR:gdbusaddress.c:913:g_dbus_address_get_stream_sync: assertion failed: (last_error != NULL)
 Aborted (core dumped)

to

 DBUS_SESSION_BUS_ADDRESS= \
 gdbus introspect --session \
                  --dest org.freedesktop.DBus \
                  --object-path /org/freedesktop/DBus
 Error connecting: The given address is empty

which is much more preferable.

Signed-off-by: David Zeuthen <davidz@redhat.com>
gio/gdbusaddress.c
gio/tests/gdbus-addresses.c