diff options
author | Havoc Pennington <hp@redhat.com> | 2003-04-19 16:16:24 +0000 |
---|---|---|
committer | Havoc Pennington <hp@redhat.com> | 2003-04-19 16:16:24 +0000 |
commit | 983200f912f41ba75a873c011bfbcd3b0285bf4c (patch) | |
tree | 794516f892061dbbcfb036110d69850885edda3d /bus/driver.c | |
parent | d3fb6f35716ff1d6f6644dea2043d539007811de (diff) |
2003-04-19 Havoc Pennington <hp@pobox.com>
* bus/driver.c (bus_driver_handle_hello): check limits and
return an error if they are exceeded.
* bus/connection.c: maintain separate lists of active and inactive
connections, and a count of each. Maintain count of completed
connections per user. Implement code to check connection limits.
* dbus/dbus-list.c (_dbus_list_unlink): export
* bus/bus.c (bus_context_check_security_policy): enforce a maximum
number of bytes in the message queue for a connection
Diffstat (limited to 'bus/driver.c')
-rw-r--r-- | bus/driver.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/bus/driver.c b/bus/driver.c index c52020b5..bc58f556 100644 --- a/bus/driver.c +++ b/bus/driver.c @@ -262,8 +262,23 @@ bus_driver_handle_hello (DBusConnection *connection, BusService *service; dbus_bool_t retval; BusRegistry *registry; + BusConnections *connections; _DBUS_ASSERT_ERROR_IS_CLEAR (error); + + /* Note that when these limits are exceeded we don't disconnect the + * connection; we just sort of leave it hanging there until it times + * out or disconnects itself or is dropped due to the max number of + * incomplete connections. It's even OK if the connection wants to + * retry the hello message, we support that. + */ + connections = bus_connection_get_connections (connection); + if (!bus_connections_check_limits (connections, connection, + error)) + { + _DBUS_ASSERT_ERROR_IS_SET (error); + return FALSE; + } if (!_dbus_string_init (&unique_name)) { |