summaryrefslogtreecommitdiff
path: root/src/core/main.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-04-26 20:26:15 +0200
committerLennart Poettering <lennart@poettering.net>2016-04-29 16:27:48 +0200
commit8b26cdbd2a949b02c0f4d94d0e157cdb9438d246 (patch)
tree48f3be87a92936994ff5f41f2005b89c1b9bffc3 /src/core/main.c
parent3282493ad0038fc2051506dd0994638dd74458d1 (diff)
core: introduce activation rate limiting for socket units
This adds two new settings TriggerLimitIntervalSec= and TriggerLimitBurst= that define a rate limit for activation of socket units. When the limit is hit, the socket is is put into a failure mode. This is an alternative fix for #2467, since the original fix resulted in issue #2684. In a later commit the StartLimitInterval=/StartLimitBurst= rate limiter will be changed to be applied after any start conditions checks are made. This way, there are two separate rate limiters enforced: one at triggering time, before any jobs are queued with this patch, as well as the start limit that is moved again to be run immediately before the unit is activated. Condition checks are done in between the two, and thus no longer affect the start limit.
Diffstat (limited to 'src/core/main.c')
-rw-r--r--src/core/main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/core/main.c b/src/core/main.c
index 75c5ff81f2..9fcd3fe1bd 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -289,6 +289,7 @@ static int parse_crash_chvt(const char *value) {
}
static int set_machine_id(const char *m) {
+ assert(m);
if (sd_id128_from_string(m, &arg_machine_id) < 0)
return -EINVAL;