Merge pull request #17302 from keszybz/fix-inhibitors

Fix inhibitors
This commit is contained in:
Lennart Poettering 2020-10-12 11:41:18 +02:00 committed by GitHub
commit 5de5dc30df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -64,7 +64,9 @@ int manager_handle_action(
/* If the key handling is turned off, don't do anything */
if (handle == HANDLE_IGNORE) {
log_debug("Refusing operation, as it is turned off.");
log_debug("Handling of %s (%s) is disabled, taking no action.",
inhibit_key == 0 ? "idle timeout" : inhibit_what_to_string(inhibit_key),
is_edge ? "edge" : "level");
return 0;
}

View File

@ -3299,6 +3299,7 @@ static int method_inhibit(sd_bus_message *message, void *userdata, sd_bus_error
r = inhibitor_start(i);
if (r < 0)
return r;
TAKE_PTR(i);
return sd_bus_reply_method_return(message, "h", fifo_fd);
}