chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
logind: small simplifications
[elogind.git]
/
src
/
login
/
logind-dbus.c
diff --git
a/src/login/logind-dbus.c
b/src/login/logind-dbus.c
index 08e53c36956a6821e56a717c646a637865375155..c9c58f3f823701f35af3311eb61a3c7205d890b7 100644
(file)
--- a/
src/login/logind-dbus.c
+++ b/
src/login/logind-dbus.c
@@
-1337,6
+1337,9
@@
static int execute_shutdown_or_sleep(
m->action_job = c;
m->action_what = w;
m->action_job = c;
m->action_what = w;
+ /* Make sure the lid switch is ignored for a while */
+ manager_set_lid_switch_ignore(m, now(CLOCK_MONOTONIC) + IGNORE_LID_SWITCH_SUSPEND_USEC);
+
return 0;
}
return 0;
}
@@
-2047,7
+2050,8
@@
int match_properties_changed(sd_bus *bus, sd_bus_message *message, void *userdat
r = unit_name_from_dbus_path(path, &unit);
if (r < 0)
r = unit_name_from_dbus_path(path, &unit);
if (r < 0)
- return r;
+ /* quietly ignore non-units paths */
+ return r == -EINVAL ? 0 : r;
session = hashmap_get(m->session_units, unit);
if (session)
session = hashmap_get(m->session_units, unit);
if (session)
@@
-2191,11
+2195,11
@@
int manager_start_scope(
r = sd_bus_message_new_method_call(
manager->bus,
r = sd_bus_message_new_method_call(
manager->bus,
+ &m,
"org.freedesktop.systemd1",
"/org/freedesktop/systemd1",
"org.freedesktop.systemd1.Manager",
"org.freedesktop.systemd1",
"/org/freedesktop/systemd1",
"org.freedesktop.systemd1.Manager",
- "StartTransientUnit",
- &m);
+ "StartTransientUnit");
if (r < 0)
return r;
if (r < 0)
return r;