summaryrefslogtreecommitdiff
path: root/src/libsystemd-bus/bus-message.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsystemd-bus/bus-message.c')
-rw-r--r--src/libsystemd-bus/bus-message.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/libsystemd-bus/bus-message.c b/src/libsystemd-bus/bus-message.c
index b26d446578..d7774db09a 100644
--- a/src/libsystemd-bus/bus-message.c
+++ b/src/libsystemd-bus/bus-message.c
@@ -777,6 +777,12 @@ _public_ int sd_bus_message_get_no_reply(sd_bus_message *m) {
return m->header->type == SD_BUS_MESSAGE_METHOD_CALL ? !!(m->header->flags & SD_BUS_MESSAGE_NO_REPLY_EXPECTED) : 0;
}
+_public_ int sd_bus_message_get_no_auto_start(sd_bus_message *m) {
+ assert_return(m, -EINVAL);
+
+ return !!(m->header->flags & SD_BUS_MESSAGE_NO_AUTO_START);
+}
+
_public_ const char *sd_bus_message_get_path(sd_bus_message *m) {
assert_return(m, NULL);
@@ -1100,6 +1106,18 @@ _public_ int sd_bus_message_set_no_reply(sd_bus_message *m, int b) {
return 0;
}
+_public_ int sd_bus_message_set_no_auto_start(sd_bus_message *m, int b) {
+ assert_return(m, -EINVAL);
+ assert_return(!m->sealed, -EPERM);
+
+ if (b)
+ m->header->flags |= SD_BUS_MESSAGE_NO_AUTO_START;
+ else
+ m->header->flags &= ~SD_BUS_MESSAGE_NO_AUTO_START;
+
+ return 0;
+}
+
static struct bus_container *message_get_container(sd_bus_message *m) {
assert(m);