From 4219b08bfa318443419c7a3acde28f0b237b05fe Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Thu, 17 Apr 2003 20:25:33 +0000 Subject: 2003-04-17 Havoc Pennington * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix logic so that if there was an OOM watch we skipped, we always return TRUE so we iterate again to have a look at it again. Fixes test suite hang. Code rearrangement also lets us lose some memset and only iterate over callbacks once. * bus/driver.c (bus_driver_handle_message): sense of test for reply was backward --- dbus/dbus-transport-unix.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'dbus/dbus-transport-unix.c') diff --git a/dbus/dbus-transport-unix.c b/dbus/dbus-transport-unix.c index 50d86301..82b28e0d 100644 --- a/dbus/dbus-transport-unix.c +++ b/dbus/dbus-transport-unix.c @@ -725,14 +725,17 @@ unix_handle_watch (DBusTransport *transport, if (watch == unix_transport->read_watch && (flags & DBUS_WATCH_READABLE)) { -#if 0 +#if 1 _dbus_verbose ("handling read watch\n"); #endif if (!do_authentication (transport, TRUE, FALSE)) return FALSE; if (!do_reading (transport)) - return FALSE; + { + _dbus_verbose ("no memory to read\n"); + return FALSE; + } } else if (watch == unix_transport->write_watch && (flags & DBUS_WATCH_WRITABLE)) @@ -745,7 +748,10 @@ unix_handle_watch (DBusTransport *transport, return FALSE; if (!do_writing (transport)) - return FALSE; + { + _dbus_verbose ("no memory to write\n"); + return FALSE; + } } #ifdef DBUS_ENABLE_VERBOSE_MODE else -- cgit