summaryrefslogtreecommitdiffstats
path: root/bus/config-parser.c
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2003-10-14 05:16:56 +0000
committerHavoc Pennington <hp@redhat.com>2003-10-14 05:16:56 +0000
commit64f5ae1a79a8cd86a3aae55e485729da438d84d0 (patch)
treeab2bc587211d813d8bb224db51c1f6446d05aa2c /bus/config-parser.c
parentbfb5de511cbc072aca59189efc1324397d8993fd (diff)
2003-10-14 Havoc Pennington <hp@redhat.com>
* 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
Diffstat (limited to 'bus/config-parser.c')
-rw-r--r--bus/config-parser.c15
1 files changed, 15 insertions, 0 deletions
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,