chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
login: ignore JobRemoved of old jobs
[elogind.git]
/
src
/
login
/
logind-dbus.c
diff --git
a/src/login/logind-dbus.c
b/src/login/logind-dbus.c
index e59795eedcaf990608e0460c89c9002683a40c3d..d88636f7471a4b1afa2da1162f3a574d5222fddb 100644
(file)
--- a/
src/login/logind-dbus.c
+++ b/
src/login/logind-dbus.c
@@
-1528,7
+1528,7
@@
int manager_dispatch_delayed(Manager *manager, bool timeout) {
assert(manager);
assert(manager);
- if (
manager->action_what == 0
)
+ if (
(0 == manager->action_what) || (HANDLE_IGNORE == manager->pending_action)
)
return 0;
if (manager_is_inhibited(manager, manager->action_what, INHIBIT_DELAY, NULL, false, false, 0, &offending)) {
return 0;
if (manager_is_inhibited(manager, manager->action_what, INHIBIT_DELAY, NULL, false, false, 0, &offending)) {
@@
-2596,7
+2596,7
@@
int match_job_removed(sd_bus_message *message, void *userdata, sd_bus_error *err
}
if (m->action_job && streq(m->action_job, path)) {
}
if (m->action_job && streq(m->action_job, path)) {
- log_info("Operation
finished."
);
+ log_info("Operation
'%s' finished.", inhibit_what_to_string(m->action_what)
);
/* Tell people that they now may take a lock again */
send_prepare_for(m, m->action_what, false);
/* Tell people that they now may take a lock again */
send_prepare_for(m, m->action_what, false);
@@
-2608,11
+2608,8
@@
int match_job_removed(sd_bus_message *message, void *userdata, sd_bus_error *err
}
session = hashmap_get(m->session_units, unit);
}
session = hashmap_get(m->session_units, unit);
- if (session) {
-
- if (streq_ptr(path, session->scope_job))
- session->scope_job = mfree(session->scope_job);
-
+ if (session && streq_ptr(path, session->scope_job)) {
+ session->scope_job = mfree(session->scope_job);
session_jobs_reply(session, unit, result);
session_save(session);
session_jobs_reply(session, unit, result);
session_save(session);
@@
-2621,7
+2618,9
@@
int match_job_removed(sd_bus_message *message, void *userdata, sd_bus_error *err
}
user = hashmap_get(m->user_units, unit);
}
user = hashmap_get(m->user_units, unit);
- if (user) {
+ if (user &&
+ (streq_ptr(path, user->service_job) ||
+ streq_ptr(path, user->slice_job))) {
if (streq_ptr(path, user->service_job))
user->service_job = mfree(user->service_job);
if (streq_ptr(path, user->service_job))
user->service_job = mfree(user->service_job);
@@
-2863,7
+2862,7
@@
int manager_start_unit(Manager *manager, const char *unit, sd_bus_error *error,
"StartUnit",
error,
&reply,
"StartUnit",
error,
&reply,
- "ss", unit, "
fail
");
+ "ss", unit, "
replace
");
if (r < 0)
return r;
if (r < 0)
return r;