diff options
Diffstat (limited to 'glib')
-rw-r--r-- | glib/test-dbus-glib.c | 7 | ||||
-rw-r--r-- | glib/test-thread-client.c | 8 | ||||
-rw-r--r-- | glib/test-thread-server.c | 8 |
3 files changed, 14 insertions, 9 deletions
diff --git a/glib/test-dbus-glib.c b/glib/test-dbus-glib.c index b5c44024..c838b688 100644 --- a/glib/test-dbus-glib.c +++ b/glib/test-dbus-glib.c @@ -6,7 +6,6 @@ int main (int argc, char **argv) { DBusConnection *connection; - DBusResultCode result; DBusMessage *message, *reply; GMainLoop *loop; DBusError error; @@ -19,11 +18,13 @@ main (int argc, char **argv) loop = g_main_loop_new (NULL, FALSE); - connection = dbus_connection_open (argv[1], &result); + dbus_error_init (&error); + connection = dbus_connection_open (argv[1], &error); if (connection == NULL) { g_printerr ("Failed to open connection to %s: %s\n", argv[1], - dbus_result_to_string (result)); + error.message); + dbus_error_free (&error); return 1; } diff --git a/glib/test-thread-client.c b/glib/test-thread-client.c index 23ec3f33..0232b860 100644 --- a/glib/test-thread-client.c +++ b/glib/test-thread-client.c @@ -56,7 +56,7 @@ int main (int argc, char *argv[]) { GMainLoop *loop; - DBusResultCode result; + DBusError error; int i; g_thread_init (NULL); @@ -68,10 +68,12 @@ main (int argc, char *argv[]) return 1; } - connection = dbus_connection_open (argv[1], &result); + dbus_error_init (&error); + connection = dbus_connection_open (argv[1], &error); if (connection == NULL) { - g_printerr ("could not open connection\n"); + g_printerr ("could not open connection: %s\n", error.message); + dbus_error_free (&error); return 1; } diff --git a/glib/test-thread-server.c b/glib/test-thread-server.c index 066c393b..06f597df 100644 --- a/glib/test-thread-server.c +++ b/glib/test-thread-server.c @@ -202,7 +202,7 @@ main (int argc, char *argv[]) { GMainLoop *loop; DBusServer *server; - DBusResultCode result; + DBusError error; g_thread_init (NULL); dbus_gthread_init (); @@ -213,11 +213,13 @@ main (int argc, char *argv[]) return 1; } - server = dbus_server_listen (argv[1], &result); + dbus_error_init (&error); + server = dbus_server_listen (argv[1], &error); if (server == NULL) { fprintf (stderr, "Failed to start server on %s: %s\n", - argv[1], dbus_result_to_string (result)); + argv[1], error.message); + dbus_error_free (&error); return 1; } |