From 51781f541094a4936d47119cd62682e0431c41e9 Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Thu, 10 Apr 2003 05:12:19 +0000 Subject: 2003-04-10 Havoc Pennington * 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. --- bus/test.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'bus/test.c') diff --git a/bus/test.c b/bus/test.c index ded23ba8..c4d999f9 100644 --- a/bus/test.c +++ b/bus/test.c @@ -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); -- cgit