Skip to content

Commit

Permalink
journal-remote: do not send _BOOT_ID twice
Browse files Browse the repository at this point in the history
Fixes #9090.

Reproducer:
systemd-journal-remote --split-mode=none -o /tmp/msg6.journal --trust=all --listen-http=8080
systemd-journal-upload -u http://localhost:8080
journalctl --file /tmp/msg6.journal -o verbose -n1
  • Loading branch information
keszybz committed May 27, 2018
1 parent 6388d90 commit 31ee78f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/journal-remote/journal-upload-journal.c
Expand Up @@ -139,6 +139,11 @@ static ssize_t write_entry(char *buf, size_t size, Uploader *u) {
continue;
}

/* We already printed the boot id from the data in
* the header, hence let's suppress it here */
if (u->field_length >= 9 && memcmp(u->field_data, "_BOOT_ID=", 9) == 0)
continue;

if (!utf8_is_printable_newline(u->field_data,
u->field_length, false)) {
u->entry_state = ENTRY_BINARY_FIELD_START;
Expand Down

0 comments on commit 31ee78f

Please sign in to comment.