summaryrefslogtreecommitdiffstats
path: root/test/test-service.c
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2003-08-31 03:25:24 +0000
committerHavoc Pennington <hp@redhat.com>2003-08-31 03:25:24 +0000
commit1dd3f1788f1b4c9af2f4fa744abdb7892d0a14b9 (patch)
tree9f928baa3e6205394044ce5f0c6f1aa3933bdf4f /test/test-service.c
parent5fd1e389e1c1c12ad4a55c2af6abdc8e7a2f6d41 (diff)
2003-08-30 Havoc Pennington <hp@pobox.com>
* dbus/dbus-connection.c: purge DBusMessageHandler * dbus/dbus-message-handler.c: remove DBusMessageHandler, just use callbacks everywhere
Diffstat (limited to 'test/test-service.c')
-rw-r--r--test/test-service.c15
1 files changed, 5 insertions, 10 deletions
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;