From 842865365e598a090045894f8990fd384e801ccb Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 24 Apr 2013 15:23:01 -0300 Subject: logind: don't busy loop if a job is still running but the delay timeout expires --- src/login/logind-dbus.c | 3 +-- src/login/logind.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'src/login') diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c index 05cc1fdd13..68e499f52c 100644 --- a/src/login/logind-dbus.c +++ b/src/login/logind-dbus.c @@ -2400,7 +2400,6 @@ DBusHandlerResult bus_message_filter( log_error("Failed to parse JobRemoved message: %s", bus_error_message(&error)); else if (m->action_job && streq(m->action_job, path)) { - log_info("Operation finished."); /* Tell people that they now may take a lock again */ @@ -2441,7 +2440,7 @@ int manager_dispatch_delayed(Manager *manager) { assert(manager); - if (!manager->action_unit || manager->action_job) + if (manager->action_what == 0 || manager->action_job) return 0; /* Continue delay? */ diff --git a/src/login/logind.c b/src/login/logind.c index 3b9da19858..536612cbd2 100644 --- a/src/login/logind.c +++ b/src/login/logind.c @@ -1626,7 +1626,7 @@ int manager_run(Manager *m) { manager_gc(m, true); - if (m->action_what != 0) { + if (m->action_what != 0 && !m->action_job) { usec_t x, y; x = now(CLOCK_MONOTONIC); -- cgit v1.2.3-54-g00ecf