summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-03-02 20:14:21 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-03-03 09:11:28 -0500
commitd288f79fb4a2fe4a93cf99f74dacd2cebd3f2440 (patch)
tree6dc0e9ce06016d356319ba8857b135adc5a70ec6
parent117dcc57930b26bd8390516624700eb2024e1bb6 (diff)
journald: do not barf when setting RateLimitInterval=0
Assertion 'interval > 0 || burst == 0' failed at src/journal/journald-rate-limit.c:78, function journal_rate_limit_new(). Aborting.
-rw-r--r--src/journal/journald-server.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c
index 818bd0803a..c8a6285a84 100644
--- a/src/journal/journald-server.c
+++ b/src/journal/journald-server.c
@@ -1310,6 +1310,12 @@ int server_init(Server *s) {
server_parse_config_file(s);
server_parse_proc_cmdline(s);
+ if (!!s->rate_limit_interval ^ !!s->rate_limit_burst) {
+ log_debug("Setting both rate limit interval and burst from %llu,%u to 0,0",
+ (long long unsigned) s->rate_limit_interval,
+ s->rate_limit_burst);
+ s->rate_limit_interval = s->rate_limit_burst = 0;
+ }
mkdir_p("/run/systemd/journal", 0755);
@@ -1396,7 +1402,8 @@ int server_init(Server *s) {
if (!s->udev)
return -ENOMEM;
- s->rate_limit = journal_rate_limit_new(s->rate_limit_interval, s->rate_limit_burst);
+ s->rate_limit = journal_rate_limit_new(s->rate_limit_interval,
+ s->rate_limit_burst);
if (!s->rate_limit)
return -ENOMEM;