diff options
author | Havoc Pennington <hp@redhat.com> | 2003-03-25 04:37:08 +0000 |
---|---|---|
committer | Havoc Pennington <hp@redhat.com> | 2003-03-25 04:37:08 +0000 |
commit | ce4fd314c6be9bfee16a172d5ca34e5097d309fc (patch) | |
tree | 744b8524f183a0fbb009d917029c9a129b34da9e /bus/test.c | |
parent | 44fff656885ac32e319feb98fd0d06680d602977 (diff) |
2003-03-24 Havoc Pennington <hp@redhat.com>
* 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
Diffstat (limited to 'bus/test.c')
-rw-r--r-- | bus/test.c | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -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 |