summaryrefslogtreecommitdiffstats
path: root/bus/test.c
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2003-03-25 04:37:08 +0000
committerHavoc Pennington <hp@redhat.com>2003-03-25 04:37:08 +0000
commitce4fd314c6be9bfee16a172d5ca34e5097d309fc (patch)
tree744b8524f183a0fbb009d917029c9a129b34da9e /bus/test.c
parent44fff656885ac32e319feb98fd0d06680d602977 (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.c18
1 files changed, 18 insertions, 0 deletions
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