journald: copy metrics/compression state from template when rotating

This commit is contained in:
Lennart Poettering
2012-03-15 03:01:09 +01:00
parent 71100051c5
commit 15944db871
2 changed files with 5 additions and 2 deletions
+5
View File
@@ -1740,6 +1740,11 @@ int journal_file_open(
f->writable = (flags & O_ACCMODE) != O_RDONLY;
f->prot = prot_from_flags(flags);
if (template) {
f->metrics = template->metrics;
f->compress = template->compress;
}
f->path = strdup(fname);
if (!f->path) {
r = -ENOMEM;
-2
View File
@@ -308,8 +308,6 @@ static JournalFile* find_journal(Server *s, uid_t uid) {
return s->system_journal;
server_fix_perms(s, f, uid);
f->metrics = s->system_metrics;
f->compress = s->compress;
r = hashmap_put(s->user_journals, UINT32_TO_PTR(uid), f);
if (r < 0) {