diff options
author | Havoc Pennington <hp@redhat.com> | 2003-03-15 20:47:16 +0000 |
---|---|---|
committer | Havoc Pennington <hp@redhat.com> | 2003-03-15 20:47:16 +0000 |
commit | f587ce7845edb0eb01451368d01b5bc86b5904cd (patch) | |
tree | f3a549cd61df701882d818b5fc452b1438097f5b /bus/dispatch.c | |
parent | f05f87a825ab8ed5273674a7f65521ffc526f0d2 (diff) |
2003-03-15 Havoc Pennington <hp@pobox.com>
Make it pass the Hello handling test including all OOM codepaths.
Now to do other messages...
* bus/services.c (bus_service_remove_owner): fix crash when
removing owner from an empty list of owners
(bus_registry_ensure): don't leave service in the list of
a connection's owned services if we fail to put the service
in the hash table.
* bus/connection.c (bus_connection_preallocate_oom_error): set
error flag on the OOM error.
* dbus/dbus-connection.c (_dbus_connection_new_for_transport):
handle _dbus_transport_set_connection failure
* dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
to create watches up front and simply enable/disable them as
needed.
(unix_connection_set): this can now fail on OOM
* dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
of enabling/disabling a watch or timeout.
* bus/loop.c (bus_loop_iterate): don't touch disabled
watches/timeouts
* glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
Diffstat (limited to 'bus/dispatch.c')
-rw-r--r-- | bus/dispatch.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/bus/dispatch.c b/bus/dispatch.c index ac2fb15b..d0def78f 100644 --- a/bus/dispatch.c +++ b/bus/dispatch.c @@ -514,6 +514,7 @@ check_hello_connection (BusContext *context) if (!bus_setup_debug_client (connection)) { + dbus_connection_disconnect (connection); dbus_connection_unref (connection); return TRUE; } @@ -582,9 +583,6 @@ bus_dispatch_test (const DBusString *test_data_dir) &error); if (context == NULL) _dbus_assert_not_reached ("could not alloc context"); - - check1_try_iterations (context, "create_and_hello", - check_hello_connection); foo = dbus_connection_open ("debug-pipe:name=test-server", &result); if (foo == NULL) @@ -610,8 +608,14 @@ bus_dispatch_test (const DBusString *test_data_dir) if (!check_hello_message (context, baz)) _dbus_assert_not_reached ("hello message failed"); + check1_try_iterations (context, "create_and_hello", + check_hello_connection); + + dbus_connection_disconnect (foo); dbus_connection_unref (foo); + dbus_connection_disconnect (bar); dbus_connection_unref (bar); + dbus_connection_disconnect (baz); dbus_connection_unref (baz); return TRUE; |