summaryrefslogtreecommitdiff
path: root/src/libsystemd
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsystemd')
-rw-r--r--src/libsystemd/libsystemd.sym.m42
-rw-r--r--src/libsystemd/sd-bus/bus-internal.h1
-rw-r--r--src/libsystemd/sd-bus/bus-slot.c16
3 files changed, 19 insertions, 0 deletions
diff --git a/src/libsystemd/libsystemd.sym.m4 b/src/libsystemd/libsystemd.sym.m4
index 04581c50cf..635caf696b 100644
--- a/src/libsystemd/libsystemd.sym.m4
+++ b/src/libsystemd/libsystemd.sym.m4
@@ -223,6 +223,8 @@ global:
sd_bus_slot_get_bus;
sd_bus_slot_get_userdata;
sd_bus_slot_set_userdata;
+ sd_bus_slot_get_description;
+ sd_bus_slot_set_description;
sd_bus_slot_get_current_message;
sd_bus_message_new_signal;
sd_bus_message_new_method_call;
diff --git a/src/libsystemd/sd-bus/bus-internal.h b/src/libsystemd/sd-bus/bus-internal.h
index b1310a8640..07381485ec 100644
--- a/src/libsystemd/sd-bus/bus-internal.h
+++ b/src/libsystemd/sd-bus/bus-internal.h
@@ -142,6 +142,7 @@ struct sd_bus_slot {
void *userdata;
BusSlotType type:5;
bool floating:1;
+ char *description;
LIST_FIELDS(sd_bus_slot, slots);
diff --git a/src/libsystemd/sd-bus/bus-slot.c b/src/libsystemd/sd-bus/bus-slot.c
index 568a6ed60c..8060e9882c 100644
--- a/src/libsystemd/sd-bus/bus-slot.c
+++ b/src/libsystemd/sd-bus/bus-slot.c
@@ -208,6 +208,7 @@ _public_ sd_bus_slot* sd_bus_slot_unref(sd_bus_slot *slot) {
}
bus_slot_disconnect(slot);
+ free(slot->description);
free(slot);
return NULL;
@@ -265,3 +266,18 @@ _public_ void* sd_bus_slot_get_current_userdata(sd_bus_slot *slot) {
return slot->bus->current_userdata;
}
+
+_public_ int sd_bus_slot_set_description(sd_bus_slot *slot, const char *description) {
+ assert_return(slot, -EINVAL);
+
+ return free_and_strdup(&slot->description, description);
+}
+
+_public_ int sd_bus_slot_get_description(sd_bus_slot *slot, char **description) {
+ assert_return(slot, -EINVAL);
+ assert_return(description, -EINVAL);
+ assert_return(slot->description, -ENXIO);
+
+ *description = slot->description;
+ return 0;
+}