From bfad32422f1f78bce4de1e88a4afb5cc295bb877 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 20 May 2009 01:32:46 +0200 Subject: unix-fd: add logic to count unix fds the same way as allocated memory This make all counters count both bytes of memory and unix fds. --- dbus/dbus-transport-socket.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'dbus/dbus-transport-socket.c') diff --git a/dbus/dbus-transport-socket.c b/dbus/dbus-transport-socket.c index 76699506..8e13baeb 100644 --- a/dbus/dbus-transport-socket.c +++ b/dbus/dbus-transport-socket.c @@ -191,7 +191,8 @@ check_read_watch (DBusTransport *transport) if (_dbus_transport_get_is_authenticated (transport)) need_read_watch = - _dbus_counter_get_value (transport->live_messages_size) < transport->max_live_messages_size; + (_dbus_counter_get_size_value (transport->live_messages) < transport->max_live_messages_size) && + (_dbus_counter_get_unix_fd_value (transport->live_messages) < transport->max_live_messages_unix_fds); else { if (transport->receive_credentials_pending) -- cgit