diff options
author | Havoc Pennington <hp@redhat.com> | 2003-08-31 03:25:24 +0000 |
---|---|---|
committer | Havoc Pennington <hp@redhat.com> | 2003-08-31 03:25:24 +0000 |
commit | 1dd3f1788f1b4c9af2f4fa744abdb7892d0a14b9 (patch) | |
tree | 9f928baa3e6205394044ce5f0c6f1aa3933bdf4f /glib/test-profile.c | |
parent | 5fd1e389e1c1c12ad4a55c2af6abdc8e7a2f6d41 (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 'glib/test-profile.c')
-rw-r--r-- | glib/test-profile.c | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/glib/test-profile.c b/glib/test-profile.c index 3eac1618..6d9d8e7f 100644 --- a/glib/test-profile.c +++ b/glib/test-profile.c @@ -63,8 +63,7 @@ send_echo_message (DBusConnection *connection) } static DBusHandlerResult -client_filter (DBusMessageHandler *handler, - DBusConnection *connection, +client_filter (DBusConnection *connection, DBusMessage *message, void *user_data) { @@ -99,7 +98,6 @@ thread_func (void *data) DBusError error; GMainContext *context; GMainLoop *loop; - DBusMessageHandler *handler; DBusConnection *connection; int iterations; @@ -116,14 +114,9 @@ thread_func (void *data) iterations = 1; - handler = dbus_message_handler_new (client_filter, - &iterations, NULL); - if (!dbus_connection_add_filter (connection, - handler)) + client_filter, &iterations, NULL)) g_error ("no memory"); - - /* FIXME we leak the handler */ context = g_main_context_new (); loop = g_main_loop_new (context, FALSE); @@ -145,8 +138,7 @@ thread_func (void *data) } static DBusHandlerResult -server_filter (DBusMessageHandler *handler, - DBusConnection *connection, +server_filter (DBusConnection *connection, DBusMessage *message, void *user_data) { @@ -172,17 +164,12 @@ static void new_connection_callback (DBusServer *server, DBusConnection *new_connection, void *user_data) -{ - DBusMessageHandler *handler; - +{ dbus_connection_ref (new_connection); dbus_connection_setup_with_g_main (new_connection, NULL); - - handler = dbus_message_handler_new (server_filter, - NULL, NULL); if (!dbus_connection_add_filter (new_connection, - handler)) + server_filter, NULL, NULL)) g_error ("no memory"); |