]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
login: mark the Display property as "emits change" 30043/head
authorFrantisek Sumsal <frantisek@sumsal.cz>
Wed, 15 Nov 2023 21:21:16 +0000 (22:21 +0100)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Wed, 15 Nov 2023 21:41:24 +0000 (22:41 +0100)
With the introduction of SetDisplay() method in 4885d7490b2 the Display
property emits a "properties changed" message every time the display is
changed using this method, so mark it appropriately.

Caught by systemd/systemd#30029:

systemd-logind[1366]: Got message type=method_call sender=:1.165 destination=org.freedesktop.login1 path=/org/freedesktop/login1/session/_310 interface=org.freedesktop.login1.Session member=SetDisplay  cookie=8 reply_cookie=0 signature=s error-name=n/a error-message=n/a
systemd-logind[1366]: Assertion 'v->vtable->flags & SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE || v->vtable->flags & SD_BUS_VTABLE_PROPERTY_EMITS_INVALIDATION' failed at src/libsystemd/sd-bus/bus-objects.c:2141, function emit_properties_changed_on_interface(). Ignoring.

Follow-up to 4885d7490b2.

man/org.freedesktop.login1.xml
src/login/logind-session-dbus.c

index 2c1b9118eaad2776e9e19a6d36cde1cc019e95dd..ba1614be4e5011f16f65f147762868c83b225d8d 100644 (file)
@@ -1161,7 +1161,6 @@ node /org/freedesktop/login1/session/1 {
       readonly (so) Seat = ...;
       @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
       readonly s TTY = '...';
-      @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
       readonly s Display = '...';
       @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
       readonly b Remote = ...;
index d9d6cb285667600d97ae5db12760f5eb6954ddae..ad4e5c5f6db32a816152d01b2650b3154b744440 100644 (file)
@@ -875,7 +875,7 @@ static const sd_bus_vtable session_vtable[] = {
         SD_BUS_PROPERTY("VTNr", "u", NULL, offsetof(Session, vtnr), SD_BUS_VTABLE_PROPERTY_CONST),
         SD_BUS_PROPERTY("Seat", "(so)", property_get_seat, 0, SD_BUS_VTABLE_PROPERTY_CONST),
         SD_BUS_PROPERTY("TTY", "s", NULL, offsetof(Session, tty), SD_BUS_VTABLE_PROPERTY_CONST),
-        SD_BUS_PROPERTY("Display", "s", NULL, offsetof(Session, display), SD_BUS_VTABLE_PROPERTY_CONST),
+        SD_BUS_PROPERTY("Display", "s", NULL, offsetof(Session, display), SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE),
         SD_BUS_PROPERTY("Remote", "b", bus_property_get_bool, offsetof(Session, remote), SD_BUS_VTABLE_PROPERTY_CONST),
         SD_BUS_PROPERTY("RemoteHost", "s", NULL, offsetof(Session, remote_host), SD_BUS_VTABLE_PROPERTY_CONST),
         SD_BUS_PROPERTY("RemoteUser", "s", NULL, offsetof(Session, remote_user), SD_BUS_VTABLE_PROPERTY_CONST),