summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-11-22 01:28:45 +0100
committerLennart Poettering <lennart@poettering.net>2013-11-22 01:42:15 +0100
commitadcc4ca30dc8ca0cddfcab64ad2eab6f6ab6fe21 (patch)
treedba15d8c1fe31c404f203072e3f2fb923d28d9fb /src
parent2be441769f29578764835df58950ac939f4e29eb (diff)
event: rename sd_event_get() to sd_event_source_get_event()
Diffstat (limited to 'src')
-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
-rw-r--r--src/socket-proxy/socket-proxyd.c6
-rw-r--r--src/systemd/sd-event.h3
5 files changed, 10 insertions, 12 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);
diff --git a/src/socket-proxy/socket-proxyd.c b/src/socket-proxy/socket-proxyd.c
index 8cba8e0679..432558d190 100644
--- a/src/socket-proxy/socket-proxyd.c
+++ b/src/socket-proxy/socket-proxyd.c
@@ -287,7 +287,7 @@ static int traffic_cb(sd_event_source *s, int fd, uint32_t revents, void *userda
if (c->client_fd == -1 && c->client_to_server_buffer_full <= 0)
goto quit;
- r = connection_enable_event_sources(c, sd_event_get(s));
+ r = connection_enable_event_sources(c, sd_event_source_get_event(s));
if (r < 0)
goto quit;
@@ -373,7 +373,7 @@ static int connect_cb(sd_event_source *s, int fd, uint32_t revents, void *userda
if (r < 0)
goto fail;
- r = connection_enable_event_sources(c, sd_event_get(s));
+ r = connection_enable_event_sources(c, sd_event_source_get_event(s));
if (r < 0)
goto fail;
@@ -477,7 +477,7 @@ static int accept_cb(sd_event_source *s, int fd, uint32_t revents, void *userdat
getpeername_pretty(nfd, &peer);
log_debug("New connection from %s", strna(peer));
- r = add_connection_socket(context, sd_event_get(s), nfd);
+ r = add_connection_socket(context, sd_event_source_get_event(s), nfd);
if (r < 0) {
close_nointr_nofail(fd);
return r;
diff --git a/src/systemd/sd-event.h b/src/systemd/sd-event.h
index e7b6c9ec9b..63b223c854 100644
--- a/src/systemd/sd-event.h
+++ b/src/systemd/sd-event.h
@@ -97,8 +97,6 @@ int sd_event_get_now_monotonic(sd_event *e, uint64_t *usec);
sd_event_source* sd_event_source_ref(sd_event_source *s);
sd_event_source* sd_event_source_unref(sd_event_source *s);
-sd_event *sd_event_get(sd_event_source *s);
-
int sd_event_source_set_prepare(sd_event_source *s, sd_event_handler_t callback);
int sd_event_source_get_pending(sd_event_source *s);
int sd_event_source_get_priority(sd_event_source *s, int *priority);
@@ -116,6 +114,7 @@ int sd_event_source_set_time_accuracy(sd_event_source *s, uint64_t usec);
int sd_event_source_get_time_accuracy(sd_event_source *s, uint64_t *usec);
int sd_event_source_get_signal(sd_event_source *s);
int sd_event_source_get_child_pid(sd_event_source *s, pid_t *pid);
+sd_event *sd_event_source_get_event(sd_event_source *s);
_SD_END_DECLARATIONS;