diff options
author | Havoc Pennington <hp@redhat.com> | 2003-06-22 19:39:47 +0000 |
---|---|---|
committer | Havoc Pennington <hp@redhat.com> | 2003-06-22 19:39:47 +0000 |
commit | 6843ad31769c088ca259020fd9ea8dfb3a51f68e (patch) | |
tree | 208e287bc200298da5514f4d32704f3e8ef42423 /glib/test-thread-server.c | |
parent | 8a71cf33ef8f35669dbdb39ef2f12c5a3dfebf33 (diff) |
2003-06-22 Havoc Pennington <hp@pobox.com>
* dbus/dbus-dataslot.c (_dbus_data_slot_allocator_unref)
(_dbus_data_slot_allocator_alloc): rework these to keep a
reference count on each slot and automatically manage a global
slot ID variable passed in by address
* bus/bus.c: convert to new dataslot API
* dbus/dbus-bus.c: convert to new dataslot API
* dbus/dbus-connection.c: convert to new dataslot API
* dbus/dbus-server.c: convert to new dataslot API
* glib/dbus-gmain.c: ditto
* bus/test.c: ditto
* bus/connection.c: ditto
Diffstat (limited to 'glib/test-thread-server.c')
-rw-r--r-- | glib/test-thread-server.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/glib/test-thread-server.c b/glib/test-thread-server.c index a92febf3..00044a79 100644 --- a/glib/test-thread-server.c +++ b/glib/test-thread-server.c @@ -27,7 +27,7 @@ thread_test_data_free (ThreadTestData *data) static DBusMessageHandler *disconnect_handler; static DBusMessageHandler *filter_handler; -static int handler_slot; +static dbus_int32_t handler_slot = -1; static DBusHandlerResult handle_test_message (DBusMessageHandler *handler, @@ -222,7 +222,8 @@ main (int argc, char *argv[]) return 1; } - handler_slot = dbus_connection_allocate_data_slot (); + if (!dbus_connection_allocate_data_slot (&handler_slot)) + g_error ("no memory for data slot"); filter_handler = dbus_message_handler_new (handle_filter, NULL, NULL); |