From ce4fd314c6be9bfee16a172d5ca34e5097d309fc Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Tue, 25 Mar 2003 04:37:08 +0000 Subject: 2003-03-24 Havoc Pennington * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this file * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow NULL argument for "message" if the error is a well-known one, fill in a generic message in this case. * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in favor of DBusError * bus/test.c (bus_test_flush_bus): add * bus/policy.c (bus_policy_test): test code stub --- bus/test.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'bus/test.c') diff --git a/bus/test.c b/bus/test.c index bc195ef1..24cc6efa 100644 --- a/bus/test.c +++ b/bus/test.c @@ -267,4 +267,22 @@ bus_test_client_listed (DBusConnection *connection) return FALSE; } + +void +bus_test_flush_bus (BusContext *context) +{ + /* This is race condition city, obviously. since we're all in one + * process we can't block, we just have to wait for data we put in + * one end of the debug pipe to come out the other end... + * a more robust setup would be good. Blocking on the other + * end of pipes we've pushed data into or something. + */ + + while (bus_loop_iterate (FALSE)) + ; + _dbus_sleep_milliseconds (15); + while (bus_loop_iterate (FALSE)) + ; +} + #endif -- cgit