summaryrefslogtreecommitdiffstats
path: root/src/libsystemd
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsystemd')
-rw-r--r--src/libsystemd/libsystemd.sym2
-rw-r--r--src/libsystemd/sd-bus/bus-convenience.c12
-rw-r--r--src/libsystemd/sd-bus/sd-bus.c14
3 files changed, 11 insertions, 17 deletions
diff --git a/src/libsystemd/libsystemd.sym b/src/libsystemd/libsystemd.sym
index fbe9803d42..78454acbc0 100644
--- a/src/libsystemd/libsystemd.sym
+++ b/src/libsystemd/libsystemd.sym
@@ -740,7 +740,7 @@ global:
LIBSYSTEMD_248 {
global:
sd_bus_open_user_machine;
- sd_bus_reply;
+ sd_bus_message_send;
sd_event_source_set_ratelimit;
sd_event_source_get_ratelimit;
diff --git a/src/libsystemd/sd-bus/bus-convenience.c b/src/libsystemd/sd-bus/bus-convenience.c
index 08f61ecc15..a36aeb238e 100644
--- a/src/libsystemd/sd-bus/bus-convenience.c
+++ b/src/libsystemd/sd-bus/bus-convenience.c
@@ -9,6 +9,14 @@
#include "bus-type.h"
#include "string-util.h"
+_public_ int sd_bus_message_send(sd_bus_message *reply) {
+ assert_return(reply, -EINVAL);
+ assert_return(reply->bus, -EINVAL);
+ assert_return(!bus_pid_changed(reply->bus), -ECHILD);
+
+ return sd_bus_send(reply->bus, reply, NULL);
+}
+
_public_ int sd_bus_emit_signalv(
sd_bus *bus,
const char *path,
@@ -198,7 +206,7 @@ _public_ int sd_bus_reply_method_returnv(
return r;
}
- return sd_bus_reply(call, m);
+ return sd_bus_message_send(m);
}
_public_ int sd_bus_reply_method_return(
@@ -239,7 +247,7 @@ _public_ int sd_bus_reply_method_error(
if (r < 0)
return r;
- return sd_bus_reply(call, m);
+ return sd_bus_message_send(m);
}
_public_ int sd_bus_reply_method_errorfv(
diff --git a/src/libsystemd/sd-bus/sd-bus.c b/src/libsystemd/sd-bus/sd-bus.c
index 1f7e71c66e..6b1f25cc02 100644
--- a/src/libsystemd/sd-bus/sd-bus.c
+++ b/src/libsystemd/sd-bus/sd-bus.c
@@ -2604,20 +2604,6 @@ _public_ int sd_bus_get_timeout(sd_bus *bus, uint64_t *timeout_usec) {
}
}
-int sd_bus_reply(const sd_bus_message *call, sd_bus_message *reply) {
- assert_return(call, -EINVAL);
- assert_return(call->sealed, -EPERM);
- assert_return(call->header->type == SD_BUS_MESSAGE_METHOD_CALL, -EINVAL);
- assert_return(call->bus, -EINVAL);
- assert_return(!bus_pid_changed(call->bus), -ECHILD);
- assert_return(reply, -EINVAL);
- assert_return(
- IN_SET(reply->header->type, SD_BUS_MESSAGE_METHOD_RETURN, SD_BUS_MESSAGE_METHOD_ERROR),
- -EINVAL);
-
- return sd_bus_send(call->bus, reply, NULL);
-}
-
static int process_timeout(sd_bus *bus) {
_cleanup_(sd_bus_error_free) sd_bus_error error_buffer = SD_BUS_ERROR_NULL;
_cleanup_(sd_bus_message_unrefp) sd_bus_message* m = NULL;