summaryrefslogtreecommitdiff
path: root/src/journal
diff options
context:
space:
mode:
Diffstat (limited to 'src/journal')
-rw-r--r--src/journal/journald-kmsg.c2
-rw-r--r--src/journal/journald-native.c2
-rw-r--r--src/journal/journald-server.c12
-rw-r--r--src/journal/journald-stream.c4
-rw-r--r--src/journal/journald-syslog.c2
5 files changed, 11 insertions, 11 deletions
diff --git a/src/journal/journald-kmsg.c b/src/journal/journald-kmsg.c
index 0c8446a3d5..05b128f843 100644
--- a/src/journal/journald-kmsg.c
+++ b/src/journal/journald-kmsg.c
@@ -403,7 +403,7 @@ int server_open_dev_kmsg(Server *s) {
return 0;
}
- r = sd_event_add_io(s->event, s->dev_kmsg_fd, EPOLLIN, dispatch_dev_kmsg, s, &s->dev_kmsg_event_source);
+ r = sd_event_add_io(s->event, &s->dev_kmsg_event_source, s->dev_kmsg_fd, EPOLLIN, dispatch_dev_kmsg, s);
if (r < 0) {
/* This will fail with EPERM on older kernels where
diff --git a/src/journal/journald-native.c b/src/journal/journald-native.c
index 5e19fa3f55..359d962c72 100644
--- a/src/journal/journald-native.c
+++ b/src/journal/journald-native.c
@@ -419,7 +419,7 @@ int server_open_native_socket(Server*s) {
return -errno;
}
- r = sd_event_add_io(s->event, s->native_fd, EPOLLIN, process_datagram, s, &s->native_event_source);
+ r = sd_event_add_io(s->event, &s->native_event_source, s->native_fd, EPOLLIN, process_datagram, s);
if (r < 0) {
log_error("Failed to add native server fd to event loop: %s", strerror(-r));
return r;
diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c
index 9ca3859297..5872e91fba 100644
--- a/src/journal/journald-server.c
+++ b/src/journal/journald-server.c
@@ -1267,19 +1267,19 @@ static int setup_signals(Server *s) {
sigset_add_many(&mask, SIGINT, SIGTERM, SIGUSR1, SIGUSR2, -1);
assert_se(sigprocmask(SIG_SETMASK, &mask, NULL) == 0);
- r = sd_event_add_signal(s->event, SIGUSR1, dispatch_sigusr1, s, &s->sigusr1_event_source);
+ r = sd_event_add_signal(s->event, &s->sigusr1_event_source, SIGUSR1, dispatch_sigusr1, s);
if (r < 0)
return r;
- r = sd_event_add_signal(s->event, SIGUSR2, dispatch_sigusr2, s, &s->sigusr2_event_source);
+ r = sd_event_add_signal(s->event, &s->sigusr2_event_source, SIGUSR2, dispatch_sigusr2, s);
if (r < 0)
return r;
- r = sd_event_add_signal(s->event, SIGTERM, dispatch_sigterm, s, &s->sigterm_event_source);
+ r = sd_event_add_signal(s->event, &s->sigterm_event_source, SIGTERM, dispatch_sigterm, s);
if (r < 0)
return r;
- r = sd_event_add_signal(s->event, SIGINT, dispatch_sigterm, s, &s->sigint_event_source);
+ r = sd_event_add_signal(s->event, &s->sigint_event_source, SIGINT, dispatch_sigterm, s);
if (r < 0)
return r;
@@ -1387,7 +1387,7 @@ int server_schedule_sync(Server *s, int priority) {
when += s->sync_interval_usec;
if (!s->sync_event_source) {
- r = sd_event_add_monotonic(s->event, when, 0, server_dispatch_sync, s, &s->sync_event_source);
+ r = sd_event_add_monotonic(s->event, &s->sync_event_source, when, 0, server_dispatch_sync, s);
if (r < 0)
return r;
@@ -1428,7 +1428,7 @@ static int server_open_hostname(Server *s) {
return -errno;
}
- r = sd_event_add_io(s->event, s->hostname_fd, 0, dispatch_hostname_change, s, &s->hostname_event_source);
+ r = sd_event_add_io(s->event, &s->hostname_event_source, s->hostname_fd, 0, dispatch_hostname_change, s);
if (r < 0) {
log_error("Failed to register hostname fd in event loop: %s", strerror(-r));
return r;
diff --git a/src/journal/journald-stream.c b/src/journal/journald-stream.c
index c032ee4a0e..36fc755260 100644
--- a/src/journal/journald-stream.c
+++ b/src/journal/journald-stream.c
@@ -403,7 +403,7 @@ static int stdout_stream_new(sd_event_source *es, int listen_fd, uint32_t revent
goto fail;
}
- r = sd_event_add_io(s->event, fd, EPOLLIN, stdout_stream_process, stream, &stream->event_source);
+ r = sd_event_add_io(s->event, &stream->event_source, fd, EPOLLIN, stdout_stream_process, stream);
if (r < 0) {
log_error("Failed to add stream to event loop: %s", strerror(-r));
goto fail;
@@ -460,7 +460,7 @@ int server_open_stdout_socket(Server *s) {
} else
fd_nonblock(s->stdout_fd, 1);
- r = sd_event_add_io(s->event, s->stdout_fd, EPOLLIN, stdout_stream_new, s, &s->stdout_event_source);
+ r = sd_event_add_io(s->event, &s->stdout_event_source, s->stdout_fd, EPOLLIN, stdout_stream_new, s);
if (r < 0) {
log_error("Failed to add stdout server fd to event source: %s", strerror(-r));
return r;
diff --git a/src/journal/journald-syslog.c b/src/journal/journald-syslog.c
index 80eb9ff2db..241f7edb6e 100644
--- a/src/journal/journald-syslog.c
+++ b/src/journal/journald-syslog.c
@@ -468,7 +468,7 @@ int server_open_syslog_socket(Server *s) {
return -errno;
}
- r = sd_event_add_io(s->event, s->syslog_fd, EPOLLIN, process_datagram, s, &s->syslog_event_source);
+ r = sd_event_add_io(s->event, &s->syslog_event_source, s->syslog_fd, EPOLLIN, process_datagram, s);
if (r < 0) {
log_error("Failed to add syslog server fd to event loop: %s", strerror(-r));
return r;