summaryrefslogtreecommitdiff
path: root/src/journal
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-12-13 03:30:42 +0100
committerLennart Poettering <lennart@poettering.net>2013-12-13 04:06:43 +0100
commit7b77ed8cf36e8eca6017791626044b61ae2d68e7 (patch)
treeb9315db260bbd82cfbc4ae7cd736d9d8df65f626 /src/journal
parentc5ef10429a7768e3453f29e8c85cb560ce382649 (diff)
event: be more conservative when returning errors from event handler callbacks
We really should return errors from event handlers if we have a continous problem and don't know any other solution.
Diffstat (limited to 'src/journal')
-rw-r--r--src/journal/journald-stream.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/journal/journald-stream.c b/src/journal/journald-stream.c
index 8958c7f3de..aba9054b27 100644
--- a/src/journal/journald-stream.c
+++ b/src/journal/journald-stream.c
@@ -293,7 +293,6 @@ static int stdout_stream_process(sd_event_source *es, int fd, uint32_t revents,
if ((revents|EPOLLIN|EPOLLHUP) != (EPOLLIN|EPOLLHUP)) {
log_error("Got invalid event from epoll for stdout stream: %"PRIx32, revents);
- r = -EIO;
goto terminate;
}
@@ -304,12 +303,11 @@ static int stdout_stream_process(sd_event_source *es, int fd, uint32_t revents,
return 0;
log_warning("Failed to read from stream: %m");
- r = -errno;
goto terminate;
}
if (l == 0) {
- r = stdout_stream_scan(s, true);
+ stdout_stream_scan(s, true);
goto terminate;
}
@@ -391,7 +389,6 @@ static int stdout_stream_new(sd_event_source *es, int listen_fd, uint32_t revent
len = sizeof(stream->ucred);
if (getsockopt(fd, SOL_SOCKET, SO_PEERCRED, &stream->ucred, &len) < 0) {
log_error("Failed to determine peer credentials: %m");
- r = -errno;
goto fail;
}
@@ -404,7 +401,6 @@ static int stdout_stream_new(sd_event_source *es, int listen_fd, uint32_t revent
if (shutdown(fd, SHUT_WR) < 0) {
log_error("Failed to shutdown writing side of socket: %m");
- r = -errno;
goto fail;
}
@@ -428,7 +424,7 @@ static int stdout_stream_new(sd_event_source *es, int listen_fd, uint32_t revent
fail:
stdout_stream_free(stream);
- return r;
+ return 0;
}
int server_open_stdout_socket(Server *s) {