Skip to content

Commit

Permalink
logind: fix emission of PropertiesChanged on seats
Browse files Browse the repository at this point in the history
The story is the same as in 471cffc:
device_attach() → seat_send_changed() → sd_bus_emit_properties_changed_strv()
→ emit_properties_changed_on_interface() → node_vtable_get_userdata()
→ seat_object_find(), which returns 0 because message == NULL.
But when we are emitting a signal, message is always NULL. Removing the
overeager check and assert in the called function allow the signal to be
emitted.

Fixes systemd#13769.
  • Loading branch information
keszybz committed Oct 21, 2019
1 parent 4b9e584 commit 8cc64c2
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/login/logind-dbus.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ int manager_get_seat_from_creds(
int r;

assert(m);
assert(message);
assert(ret);

if (SEAT_IS_SELF(name) || SEAT_IS_AUTO(name)) {
Expand Down
2 changes: 0 additions & 2 deletions src/login/logind-seat-dbus.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,6 @@ int seat_object_find(sd_bus *bus, const char *path, const char *interface, void
return -ENOMEM;

message = sd_bus_get_current_message(bus);
if (!message)
return 0;

r = manager_get_seat_from_creds(m, message, e, error, &seat);
if (r == -ENXIO) {
Expand Down

0 comments on commit 8cc64c2

Please sign in to comment.