From: Frantisek Sumsal Date: Wed, 15 Nov 2023 21:21:16 +0000 (+0100) Subject: login: mark the Display property as "emits change" X-Git-Tag: v255-rc3~55^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F30043%2Fhead;p=thirdparty%2Fsystemd.git login: mark the Display property as "emits change" 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. --- diff --git a/man/org.freedesktop.login1.xml b/man/org.freedesktop.login1.xml index 2c1b9118eaa..ba1614be4e5 100644 --- a/man/org.freedesktop.login1.xml +++ b/man/org.freedesktop.login1.xml @@ -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 = ...; diff --git a/src/login/logind-session-dbus.c b/src/login/logind-session-dbus.c index d9d6cb28566..ad4e5c5f6db 100644 --- a/src/login/logind-session-dbus.c +++ b/src/login/logind-session-dbus.c @@ -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),