summaryrefslogtreecommitdiff
path: root/src/dbus.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dbus.c')
-rw-r--r--src/dbus.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/dbus.c b/src/dbus.c
index 0b93db55de..0ab55b8539 100644
--- a/src/dbus.c
+++ b/src/dbus.c
@@ -474,11 +474,14 @@ static DBusHandlerResult system_bus_message_filter(DBusConnection *connection, D
static DBusHandlerResult private_bus_message_filter(DBusConnection *connection, DBusMessage *message, void *data) {
Manager *m = data;
+ DBusError error;
assert(connection);
assert(message);
assert(m);
+ dbus_error_init(&error);
+
if (dbus_message_get_type(message) == DBUS_MESSAGE_TYPE_METHOD_CALL ||
dbus_message_get_type(message) == DBUS_MESSAGE_TYPE_SIGNAL)
log_debug("Got D-Bus request: %s.%s() on %s",
@@ -488,6 +491,18 @@ static DBusHandlerResult private_bus_message_filter(DBusConnection *connection,
if (dbus_message_is_signal(message, DBUS_INTERFACE_LOCAL, "Disconnected"))
shutdown_connection(m, connection);
+ else if (dbus_message_is_signal(message, "org.freedesktop.systemd1.Agent", "Released")) {
+ const char *cgroup;
+
+ if (!dbus_message_get_args(message, &error,
+ DBUS_TYPE_STRING, &cgroup,
+ DBUS_TYPE_INVALID))
+ log_error("Failed to parse Released message: %s", error.message);
+ else
+ cgroup_notify_empty(m, cgroup);
+ }
+
+ dbus_error_free(&error);
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
}