journal: silently skip failing large messages if journald is missing

We treated -ENOENT errors with silent failure, for small messages.
Do the same for large messages.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2015-12-03 02:44:50 -05:00
parent 726f4c4738
commit 4941e4aca9

View file

@ -337,7 +337,11 @@ _public_ int sd_journal_sendv(const struct iovec *iov, int n) {
return r;
}
return send_one_fd_sa(fd, buffer_fd, mh.msg_name, mh.msg_namelen, 0);
r = send_one_fd_sa(fd, buffer_fd, mh.msg_name, mh.msg_namelen, 0);
if (r == -ENOENT)
/* Fail silently if the journal is not available */
return 0;
return r;
}
static int fill_iovec_perror_and_send(const char *message, int skip, struct iovec iov[]) {