From: Sven Eden Date: Wed, 17 May 2017 05:56:39 +0000 (+0200) Subject: Reset pending actions after returning from possible suspend/sleep actions. X-Git-Tag: v228.2~1 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=0c062994071d861a12181555617f83c32eb27a14 Reset pending actions after returning from possible suspend/sleep actions. This should fix any "suspension loops". --- diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c index 209e62b67..82ab09be1 100644 --- a/src/login/logind-dbus.c +++ b/src/login/logind-dbus.c @@ -1532,6 +1532,10 @@ static int execute_shutdown_or_sleep( "ss", NULL, "replace-irreversibly"); #else r = shutdown_or_sleep(m, action); + + /* no more pending actions, whether this failed or not */ + m->pending_action = HANDLE_IGNORE; + m->action_what = 0; #endif // 0 if (r < 0) return r;