summaryrefslogtreecommitdiff
path: root/bus/utils.c
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2003-04-06 23:53:27 +0000
committerHavoc Pennington <hp@redhat.com>2003-04-06 23:53:27 +0000
commitdf008ef97deacd5bb00ac335e5d8671798fa09dd (patch)
tree806477f545a05128aa17f6981d4f6185cf7587fe /bus/utils.c
parent856361ff5b8ce701cdb447085931d3076ee52008 (diff)
2003-04-06 Havoc Pennington <hp@pobox.com>
* 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
Diffstat (limited to 'bus/utils.c')
-rw-r--r--bus/utils.c20
1 files changed, 2 insertions, 18 deletions
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 <config.h>
#include "utils.h"
#include <dbus/dbus-sysdeps.h>
+#include <dbus/dbus-mainloop.h>
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;
}