From 64f5ae1a79a8cd86a3aae55e485729da438d84d0 Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Tue, 14 Oct 2003 05:16:56 +0000 Subject: 2003-10-14 Havoc Pennington * bus/connection.c: implement pending reply tracking using BusExpireList * bus/bus.c (bus_context_check_security_policy): verify that a reply is pending in order to allow a reply to be sent. Deny messages of unknown type. * bus/dbus-daemon-1.1.in: update to mention new resource limits * bus/bus.c (bus_context_get_max_replies_per_connection): new (bus_context_get_reply_timeout): new --- bus/config-parser.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'bus/config-parser.c') diff --git a/bus/config-parser.c b/bus/config-parser.c index 3ff3ec50..b3652591 100644 --- a/bus/config-parser.c +++ b/bus/config-parser.c @@ -336,6 +336,9 @@ bus_config_parser_new (const DBusString *basedir, parser->limits.max_services_per_connection = 256; parser->limits.max_match_rules_per_connection = 128; + + parser->limits.reply_timeout = 5 * 60 * 1000; /* 5 minutes */ + parser->limits.max_replies_per_connection = 32; parser->refcount = 1; @@ -1397,6 +1400,12 @@ set_limit (BusConfigParser *parser, must_be_int = TRUE; parser->limits.auth_timeout = value; } + else if (strcmp (name, "reply_timeout") == 0) + { + must_be_positive = TRUE; + must_be_int = TRUE; + parser->limits.reply_timeout = value; + } else if (strcmp (name, "max_completed_connections") == 0) { must_be_positive = TRUE; @@ -1427,6 +1436,12 @@ set_limit (BusConfigParser *parser, must_be_int = TRUE; parser->limits.max_services_per_connection = value; } + else if (strcmp (name, "max_replies_per_connection") == 0) + { + must_be_positive = TRUE; + must_be_int = TRUE; + parser->limits.max_replies_per_connection = value; + } else { dbus_set_error (error, DBUS_ERROR_FAILED, -- cgit