diff options
Diffstat (limited to 'test/watch.c')
-rw-r--r-- | test/watch.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/test/watch.c b/test/watch.c index f9b8b8d9..02a1e976 100644 --- a/test/watch.c +++ b/test/watch.c @@ -297,16 +297,10 @@ quit_mainloop (void) } static void -error_handler (DBusConnection *connection, - DBusResultCode error_code, - void *data) +disconnect_handler (DBusConnection *connection, + void *data) { - fprintf (stderr, - "Error on connection: %s\n", - dbus_result_to_string (error_code)); - - /* we don't want to be called again since we're dropping the connection */ - dbus_connection_set_error_function (connection, NULL, NULL, NULL); + fprintf (stderr, "Disconnected\n"); _dbus_list_remove (&connections, connection); dbus_connection_unref (connection); @@ -322,9 +316,9 @@ setup_connection (DBusConnection *connection) connection, NULL); - dbus_connection_set_error_function (connection, - error_handler, - NULL, NULL); + dbus_connection_set_disconnect_function (connection, + disconnect_handler, + NULL, NULL); dbus_connection_ref (connection); _dbus_list_append (&connections, connection); |