diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-12-23 02:59:03 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-12-23 04:20:55 +0100 |
commit | a7639e37afd6afeb7b83b11e75894faa06694ba6 (patch) | |
tree | 9f96b66f2ee1501ccdd3f9aa9d50146b713da1d1 /src/libsystemd-bus | |
parent | 508c6f95cbcf1afd234eb9220554fc13f9698fa5 (diff) |
bus-proxyd: synthesize NameAcquire/NameLost signals for socket clients
Diffstat (limited to 'src/libsystemd-bus')
-rw-r--r-- | src/libsystemd-bus/bus-message.c | 10 | ||||
-rw-r--r-- | src/libsystemd-bus/bus-message.h | 2 | ||||
-rw-r--r-- | src/libsystemd-bus/sd-bus.c | 2 |
3 files changed, 13 insertions, 1 deletions
diff --git a/src/libsystemd-bus/bus-message.c b/src/libsystemd-bus/bus-message.c index b0f4b16d41..39a85d58f7 100644 --- a/src/libsystemd-bus/bus-message.c +++ b/src/libsystemd-bus/bus-message.c @@ -5524,3 +5524,13 @@ int bus_message_remarshal(sd_bus *bus, sd_bus_message **m) { return 0; } + +int bus_message_append_sender(sd_bus_message *m, const char *sender) { + assert(m); + assert(sender); + + assert_return(!m->sealed, -EPERM); + assert_return(!m->sender, -EPERM); + + return message_append_field_string(m, BUS_MESSAGE_HEADER_SENDER, SD_BUS_TYPE_STRING, sender, &m->sender); +} diff --git a/src/libsystemd-bus/bus-message.h b/src/libsystemd-bus/bus-message.h index cd1fb0e546..589c819c73 100644 --- a/src/libsystemd-bus/bus-message.h +++ b/src/libsystemd-bus/bus-message.h @@ -234,3 +234,5 @@ int bus_message_to_errno(sd_bus_message *m); int bus_message_new_synthetic_error(sd_bus *bus, uint64_t serial, const sd_bus_error *e, sd_bus_message **m); int bus_message_remarshal(sd_bus *bus, sd_bus_message **m); + +int bus_message_append_sender(sd_bus_message *m, const char *sender); diff --git a/src/libsystemd-bus/sd-bus.c b/src/libsystemd-bus/sd-bus.c index 5ea27ee7ef..ee62b3487e 100644 --- a/src/libsystemd-bus/sd-bus.c +++ b/src/libsystemd-bus/sd-bus.c @@ -374,7 +374,7 @@ static int bus_send_hello(sd_bus *bus) { r = sd_bus_message_new_method_call( bus, "org.freedesktop.DBus", - "/", + "/org/freedesktop/DBus", "org.freedesktop.DBus", "Hello", &m); |