summaryrefslogtreecommitdiff
path: root/src/libsystemd-bus
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsystemd-bus')
-rw-r--r--src/libsystemd-bus/libsystemd-bus.sym3
-rw-r--r--src/libsystemd-bus/sd-event.c2
-rw-r--r--src/libsystemd-bus/test-event.c8
3 files changed, 6 insertions, 7 deletions
diff --git a/src/libsystemd-bus/libsystemd-bus.sym b/src/libsystemd-bus/libsystemd-bus.sym
index f8c60b4459..9cf06c44dd 100644
--- a/src/libsystemd-bus/libsystemd-bus.sym
+++ b/src/libsystemd-bus/libsystemd-bus.sym
@@ -235,8 +235,6 @@ global:
sd_event_source_ref;
sd_event_source_unref;
- sd_event_get;
-
sd_event_source_set_prepare;
sd_event_source_get_pending;
sd_event_source_get_priority;
@@ -254,6 +252,7 @@ global:
sd_event_source_get_time_accuracy;
sd_event_source_get_signal;
sd_event_source_get_child_pid;
+ sd_event_source_get_event;
/* sd-utf8 function */
sd_utf8_is_valid;
diff --git a/src/libsystemd-bus/sd-event.c b/src/libsystemd-bus/sd-event.c
index 2a8eac6df2..6a6581bec6 100644
--- a/src/libsystemd-bus/sd-event.c
+++ b/src/libsystemd-bus/sd-event.c
@@ -984,7 +984,7 @@ _public_ sd_event_source* sd_event_source_unref(sd_event_source *s) {
return NULL;
}
-_public_ sd_event *sd_event_get(sd_event_source *s) {
+_public_ sd_event *sd_event_source_get_event(sd_event_source *s) {
assert_return(s, NULL);
return s->event;
diff --git a/src/libsystemd-bus/test-event.c b/src/libsystemd-bus/test-event.c
index ba60a47a34..5360d8758c 100644
--- a/src/libsystemd-bus/test-event.c
+++ b/src/libsystemd-bus/test-event.c
@@ -63,7 +63,7 @@ static int child_handler(sd_event_source *s, const siginfo_t *si, void *userdata
assert(userdata == INT_TO_PTR('f'));
- assert_se(sd_event_request_quit(sd_event_get(s)) >= 0);
+ assert_se(sd_event_request_quit(sd_event_source_get_event(s)) >= 0);
sd_event_source_unref(s);
return 1;
@@ -91,7 +91,7 @@ static int signal_handler(sd_event_source *s, const struct signalfd_siginfo *si,
if (pid == 0)
_exit(0);
- assert_se(sd_event_add_child(sd_event_get(s), pid, WEXITED, child_handler, INT_TO_PTR('f'), &p) >= 0);
+ assert_se(sd_event_add_child(sd_event_source_get_event(s), pid, WEXITED, child_handler, INT_TO_PTR('f'), &p) >= 0);
assert_se(sd_event_source_set_enabled(p, SD_EVENT_ONESHOT) >= 0);
sd_event_source_unref(s);
@@ -112,7 +112,7 @@ static int defer_handler(sd_event_source *s, void *userdata) {
assert_se(sigemptyset(&ss) >= 0);
assert_se(sigaddset(&ss, SIGUSR1) >= 0);
assert_se(sigprocmask(SIG_BLOCK, &ss, NULL) >= 0);
- assert_se(sd_event_add_signal(sd_event_get(s), SIGUSR1, signal_handler, INT_TO_PTR('e'), &p) >= 0);
+ assert_se(sd_event_add_signal(sd_event_source_get_event(s), SIGUSR1, signal_handler, INT_TO_PTR('e'), &p) >= 0);
assert_se(sd_event_source_set_enabled(p, SD_EVENT_ONESHOT) >= 0);
raise(SIGUSR1);
@@ -131,7 +131,7 @@ static int time_handler(sd_event_source *s, uint64_t usec, void *userdata) {
if (do_quit) {
sd_event_source *p;
- assert_se(sd_event_add_defer(sd_event_get(s), defer_handler, INT_TO_PTR('d'), &p) >= 0);
+ assert_se(sd_event_add_defer(sd_event_source_get_event(s), defer_handler, INT_TO_PTR('d'), &p) >= 0);
assert_se(sd_event_source_set_enabled(p, SD_EVENT_ONESHOT) >= 0);
} else {
assert(!got_c);