From 1dd3f1788f1b4c9af2f4fa744abdb7892d0a14b9 Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Sun, 31 Aug 2003 03:25:24 +0000 Subject: 2003-08-30 Havoc Pennington * dbus/dbus-connection.c: purge DBusMessageHandler * dbus/dbus-message-handler.c: remove DBusMessageHandler, just use callbacks everywhere --- test/test-service.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'test/test-service.c') diff --git a/test/test-service.c b/test/test-service.c index 533f94ae..f22b1753 100644 --- a/test/test-service.c +++ b/test/test-service.c @@ -72,8 +72,7 @@ handle_echo (DBusConnection *connection, } static DBusHandlerResult -filter_func (DBusMessageHandler *handler, - DBusConnection *connection, +filter_func (DBusConnection *connection, DBusMessage *message, void *user_data) { @@ -104,7 +103,6 @@ main (int argc, { DBusConnection *connection; DBusError error; - DBusMessageHandler *handler; int result; dbus_error_init (&error); @@ -124,11 +122,8 @@ main (int argc, if (!test_connection_setup (loop, connection)) die ("No memory\n"); - handler = dbus_message_handler_new (filter_func, NULL, NULL); - if (handler == NULL) - die ("No memory"); - - if (!dbus_connection_add_filter (connection, handler)) + if (!dbus_connection_add_filter (connection, + filter_func, NULL, NULL)) die ("No memory"); result = dbus_bus_acquire_service (connection, "org.freedesktop.DBus.TestSuiteEchoService", @@ -145,10 +140,10 @@ main (int argc, _dbus_loop_run (loop); test_connection_shutdown (loop, connection); + + dbus_connection_remove_filter (connection, filter_func, NULL); dbus_connection_unref (connection); - - dbus_message_handler_unref (handler); _dbus_loop_unref (loop); loop = NULL; -- cgit