diff options
author | Havoc Pennington <hp@redhat.com> | 2003-04-10 05:12:19 +0000 |
---|---|---|
committer | Havoc Pennington <hp@redhat.com> | 2003-04-10 05:12:19 +0000 |
commit | 51781f541094a4936d47119cd62682e0431c41e9 (patch) | |
tree | d551d4ed8147fd12a73a86ea3febd95608fff491 /bus/test.c | |
parent | 49f6e320d790e168ccec040ad47b787c32107bde (diff) |
2003-04-10 Havoc Pennington <hp@pobox.com>
* bus/dispatch.c: lots of fixes
* dbus/dbus-mainloop.c (_dbus_loop_dispatch): export
(_dbus_loop_iterate): remove old "quit if no callbacks" code,
that was crack, broke the test service.
* dbus/dbus-transport.c (_dbus_transport_open): fix error
handling to avoid piling up errors if we get a failure on the
first address.
* dbus/dbus-internals.c (_dbus_real_assert_not_reached): include
pid in assertion failures.
* dbus/dbus-mainloop.c (_dbus_loop_iterate): use static arrays up
to some fixed size of file descriptor array. Don't return TRUE
anytime a timeout exists, that led to lots of busy loop silliness
in the tests.
Diffstat (limited to 'bus/test.c')
-rw-r--r-- | bus/test.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -301,6 +301,11 @@ bus_test_run_clients_loop (dbus_bool_t block_once) { if (client_loop == NULL) return; + + /* dispatch before we block so pending dispatches + * won't make our block return early + */ + _dbus_loop_dispatch (client_loop); /* Do one blocking wait, since we're expecting data */ _dbus_loop_iterate (client_loop, block_once); @@ -314,6 +319,11 @@ void bus_test_run_bus_loop (BusContext *context, dbus_bool_t block_once) { + /* dispatch before we block so pending dispatches + * won't make our block return early + */ + _dbus_loop_dispatch (bus_context_get_loop (context)); + /* Do one blocking wait, since we're expecting data */ _dbus_loop_iterate (bus_context_get_loop (context), block_once); |