summaryrefslogtreecommitdiffstats
path: root/bus/test.c
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2003-04-10 05:12:19 +0000
committerHavoc Pennington <hp@redhat.com>2003-04-10 05:12:19 +0000
commit51781f541094a4936d47119cd62682e0431c41e9 (patch)
treed551d4ed8147fd12a73a86ea3febd95608fff491 /bus/test.c
parent49f6e320d790e168ccec040ad47b787c32107bde (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.c10
1 files changed, 10 insertions, 0 deletions
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);