chiark / gitweb /
logind: fix delayed execution regression
authorDaniel Mack <daniel@zonque.org>
Mon, 8 Jun 2015 20:58:50 +0000 (22:58 +0200)
committerSven Eden <yamakuzure@gmx.net>
Tue, 14 Mar 2017 09:01:48 +0000 (10:01 +0100)
commit61c0276130571598a970f314368866b219d7cddc
tree47b8177669b13fe1d8490f79752325deab098700
parent3a7b6e3724297e0fb7a57ea45a3cbc46213e9ec4
logind: fix delayed execution regression

Commit c0f32805 ("logind: use sd_event timer source for inhibitor
logic") reworked the main loop logic of logind so that it uses a
real timeout callback handler to execute delayed functions.

What the old code did, however, was to call those functions on
every iteration in the main loop, not only when the timeout
expired.

Restore that behavior by bringing back manager_dispatch_delayed(),
and call it from manager_run(). The internal event source callback
manager_inhibit_timeout_handler() was turned into a wrapper of
manager_dispatch_delayed() now.
src/login/logind-dbus.c
src/login/logind.c
src/login/logind.h