chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
13eeee9
)
logind: method_schedule_shutdown() already rejects empty `type`
author
Alan Jenkins
<alan.christopher.jenkins@gmail.com>
Tue, 22 Aug 2017 12:54:21 +0000
(13:54 +0100)
committer
Sven Eden
<yamakuzure@gmx.net>
Mon, 25 Sep 2017 12:31:35 +0000
(14:31 +0200)
Don't test for an empty `type` afterwards. This is not how you cancel
scheduled shutdowns - there's a separate method for that.
src/login/logind-dbus.c
patch
|
blob
|
history
diff --git
a/src/login/logind-dbus.c
b/src/login/logind-dbus.c
index 0abf4d50e9626b8dc25e9d9a8a84400fa326895d..d5a6a21a6922d5e9d0ca47a33ae30a3ec601a9df 100644
(file)
--- a/
src/login/logind-dbus.c
+++ b/
src/login/logind-dbus.c
@@
-2100,12
+2100,9
@@
static int method_schedule_shutdown(sd_bus_message *message, void *userdata, sd_
if (r < 0)
return r;
- if (!isempty(type)) {
- r = update_schedule_file(m);
- if (r < 0)
- return r;
- } else
- (void) unlink("/run/systemd/shutdown/scheduled");
+ r = update_schedule_file(m);
+ if (r < 0)
+ return r;
return sd_bus_reply_method_return(message, NULL);
}