diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2015-12-03 02:44:50 -0500 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2015-12-03 11:44:59 -0500 |
commit | 4941e4aca907f26bf74aa9efe1c70ccad1d10a82 (patch) | |
tree | d4355ed50312475c25df48159630dcd96cc0fe5a /src | |
parent | 726f4c4738e74c5b2d1f9b4eede3a7f753440e8d (diff) |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/journal/journal-send.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/journal/journal-send.c b/src/journal/journal-send.c index adb3af006d..44fa11a00e 100644 --- a/src/journal/journal-send.c +++ b/src/journal/journal-send.c @@ -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[]) { |