Skip to content

Commit

Permalink
[dbus] Handle D-Bus name owner handoff correctly. JB#46305
Browse files Browse the repository at this point in the history
Name ownership transfers from one owner to another are not handled
correctly - which can cause problems in cases where such ownership
handoffs are desirable e.g. switching from unlock agent to lipstick
during home unlocking operation.

Treat name owner handoff internally within mce as name owner lost
immediately followed by name owner gained.

Signed-off-by: Simo Piiroinen <simo.piiroinen@jollamobile.com>
  • Loading branch information
spiiroin committed Jun 20, 2019
1 parent 06a7429 commit 1a32e3c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions mce-dbus.c
Expand Up @@ -2117,12 +2117,11 @@ mce_dbus_update_peerinfo(const char *name, const char *owner)
goto EXIT;

if( peerinfo_set_owner_name(info, owner) ) {
peerinfo_set_state(info, PEERSTATE_STOPPED);

if( peerinfo_get_owner_name(info) ) {
peerinfo_set_state(info, PEERSTATE_QUERY_PID);
}
else {
peerinfo_set_state(info, PEERSTATE_STOPPED);
}
}

EXIT:
Expand Down

0 comments on commit 1a32e3c

Please sign in to comment.