summaryrefslogtreecommitdiff
path: root/src/logind-dbus.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/logind-dbus.c')
-rw-r--r--src/logind-dbus.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/logind-dbus.c b/src/logind-dbus.c
index 2a85749478..0f3de41fff 100644
--- a/src/logind-dbus.c
+++ b/src/logind-dbus.c
@@ -896,6 +896,36 @@ const DBusObjectPathVTable bus_manager_vtable = {
.message_function = manager_message_handler
};
+DBusHandlerResult bus_message_filter(
+ DBusConnection *connection,
+ DBusMessage *message,
+ void *userdata) {
+
+ Manager *m = userdata;
+ DBusError error;
+
+ assert(m);
+ assert(connection);
+ assert(message);
+
+ dbus_error_init(&error);
+
+ 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", bus_error_message(&error));
+ else
+ manager_cgroup_notify_empty(m, cgroup);
+ }
+
+ dbus_error_free(&error);
+
+ return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+}
+
int manager_send_changed(Manager *manager, const char *properties) {
DBusMessage *m;
int r = -ENOMEM;