suspend: reset sleep inhibitor if already present upon resume

This commit is contained in:
Arnaud Ferraris
2020-12-11 15:09:10 +01:00
parent fd6a292a8f
commit 5715138a96

View File

@@ -66,7 +66,8 @@ static void take_inhibitor(struct EG25Manager *manager)
{
GVariant *variant_arg;
g_assert(manager->suspend_inhibit_fd == -1);
if(manager->suspend_inhibit_fd != -1)
drop_inhibitor(manager);
variant_arg = g_variant_new ("(ssss)", "sleep", "eg25manager",
"eg25manager needs to prepare modem for sleep", "delay");