From df008ef97deacd5bb00ac335e5d8671798fa09dd Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Sun, 6 Apr 2003 23:53:27 +0000 Subject: 2003-04-06 Havoc Pennington * dbus/Makefile.am: split lists of sources into stuff that goes in the library, util functions that go in the lib and are also used elsewhere, and util functions that are used in tests/daemon but don't go in the lib. * dbus/dbus-mainloop.h, dbus/dbus-mainloop.c: move bus/loop.[hc] here so it can be used in test binaries also --- bus/utils.c | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) (limited to 'bus/utils.c') diff --git a/bus/utils.c b/bus/utils.c index df061165..65873b59 100644 --- a/bus/utils.c +++ b/bus/utils.c @@ -25,26 +25,10 @@ #include #include "utils.h" #include +#include const char bus_no_memory_message[] = "Memory allocation failure in message bus"; -int -bus_get_oom_wait (void) -{ -#ifdef DBUS_BUILD_TESTS - /* make tests go fast */ - return 0; -#else - return 500; -#endif -} - -void -bus_wait_for_memory (void) -{ - _dbus_sleep_milliseconds (bus_get_oom_wait ()); -} - void bus_connection_dispatch_all_messages (DBusConnection *connection) { @@ -58,7 +42,7 @@ bus_connection_dispatch_one_message (DBusConnection *connection) DBusDispatchStatus status; while ((status = dbus_connection_dispatch (connection)) == DBUS_DISPATCH_NEED_MEMORY) - bus_wait_for_memory (); + _dbus_wait_for_memory (); return status == DBUS_DISPATCH_DATA_REMAINS; } -- cgit