From 71b2a17ad25c8ad957ed2ee55c824382c122fb60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20V=C3=B6llinger?= Date: Tue, 21 Jan 2014 18:43:47 +0100 Subject: Checks for inactive User --- ambithread.c | 2 +- ambithread.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ambithread.c b/ambithread.c index 619d55e..91569f5 100644 --- a/ambithread.c +++ b/ambithread.c @@ -88,7 +88,7 @@ void cAmbiThread::Action() { MsTime start = msNow(); - if(softhddeviceNotDetached() == fail) + if(ShutdownHandler.IsUserInactive() || softhddeviceNotDetached() == fail) { bob.close(); waitCondition.TimedWait(mutex, 1000); diff --git a/ambithread.h b/ambithread.h index 9c3ed4c..abc1c58 100644 --- a/ambithread.h +++ b/ambithread.h @@ -20,6 +20,7 @@ #include #include +#include #include "common.h" #include "config.h" -- cgit v1.2.3