From 983200f912f41ba75a873c011bfbcd3b0285bf4c Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Sat, 19 Apr 2003 16:16:24 +0000 Subject: 2003-04-19 Havoc Pennington * 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 --- dbus/dbus-list.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'dbus/dbus-list.c') diff --git a/dbus/dbus-list.c b/dbus/dbus-list.c index 5f4c67ca..235ed275 100644 --- a/dbus/dbus-list.c +++ b/dbus/dbus-list.c @@ -470,7 +470,15 @@ _dbus_list_remove_last (DBusList **list, return FALSE; } -static void +/** + * Removes the given link from the list, but doesn't + * free it. _dbus_list_remove_link() both removes the + * link and also frees it. + * + * @param list the list + * @param link the link in the list + */ +void _dbus_list_unlink (DBusList **list, DBusList *link) { @@ -487,6 +495,9 @@ _dbus_list_unlink (DBusList **list, if (*list == link) *list = link->next; } + + link->next = NULL; + link->prev = NULL; } /** -- cgit