From 502fbda2201a4e7e50d687f42af29c82e66299bb Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Sun, 19 Jan 2003 03:33:35 +0000 Subject: 2003-01-18 Havoc Pennington * dbus/dbus-transport-unix.c (unix_do_iteration): only do the reading/writing if read_watch != NULL or write_watch != NULL. * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix the message loader code to actually load message->header and message->body into the newly-created message. * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak in OOM case * dbus/dbus-connection.c (dbus_connection_set_max_message_size) (dbus_connection_get_max_message_size) (dbus_connection_set_max_live_messages_size) (dbus_connection_get_max_live_messages_size): implement some resource limitation functions * dbus/dbus-resources.c: new file implementing some of the resource limits stuff * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add missing docs, add @todo to handle OOM etc. * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing docs --- dbus/dbus-transport-protected.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'dbus/dbus-transport-protected.h') diff --git a/dbus/dbus-transport-protected.h b/dbus/dbus-transport-protected.h index b9bbb40d..46dfe141 100644 --- a/dbus/dbus-transport-protected.h +++ b/dbus/dbus-transport-protected.h @@ -28,6 +28,7 @@ #include #include #include +#include DBUS_BEGIN_DECLS; @@ -63,6 +64,9 @@ struct DBusTransportVTable /**< Called to do a single "iteration" (block on select/poll * followed by reading or writing data). */ + + void (* live_messages_changed) (DBusTransport *transport); + /**< Outstanding messages counter changed */ }; struct DBusTransport @@ -77,7 +81,11 @@ struct DBusTransport DBusAuth *auth; /**< Authentication conversation */ - DBusCredentials credentials; /**< Credentials of other end */ + DBusCredentials credentials; /**< Credentials of other end */ + + long max_live_messages_size; /**< Max total size of received messages. */ + + DBusCounter *live_messages_size; /**< Counter for size of all live messages. */ unsigned int disconnected : 1; /**< #TRUE if we are disconnected. */ unsigned int authenticated : 1; /**< Cache of auth state; use _dbus_transport_get_is_authenticated() to query value */ -- cgit