diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2001-09-07 15:37:26 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2001-09-07 15:37:26 +0200 |
commit | 3b6782a774510608efcca20bdd703c83151e85e8 (patch) | |
tree | bf1737187f548eea92190227b8fdcfacbdd1ad10 | |
parent | fa31c70f7d19100d6199ad2ebe70d14e70df3b2d (diff) | |
download | vdr-3b6782a774510608efcca20bdd703c83151e85e8.tar.gz vdr-3b6782a774510608efcca20bdd703c83151e85e8.tar.bz2 |
Some fixes to the shutdown feature
-rw-r--r-- | HISTORY | 7 | ||||
-rw-r--r-- | MANUAL | 2 | ||||
-rw-r--r-- | config.c | 4 | ||||
-rw-r--r-- | config.h | 4 | ||||
-rw-r--r-- | vdr.c | 17 |
5 files changed, 23 insertions, 11 deletions
@@ -715,3 +715,10 @@ Video Disk Recorder Revision History definitions). Use your favourite text editor to delete that information. That way every recording will store the actual summary data at the time of the recording. + +2001-09-03: Version 0.95 + +- Fixed behaviour in case the shutdown didn't take place (there were many + "next timer event at..." messages in that case). +- Reduced the default value for MinEventTimeout to 30 minutes. +- Fixed detecting manual start in shutdown feature. @@ -442,7 +442,7 @@ Video Disk Recorder User's Manual you may want to use smaller values if you are planning on archiving a recording to CD. - MinEventTimeout=120 If the command line option '-s' has been set, VDR will + MinEventTimeout=30 If the command line option '-s' has been set, VDR will MinUserInactivity=120 automatically shutdown the computer if the next timer event is at least MinEventTimeout minutes in the future, and the user has been inactive for at least @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: config.c 1.64 2001/09/02 15:04:13 kls Exp $ + * $Id: config.c 1.65 2001/09/03 16:01:46 kls Exp $ */ #include "config.h" @@ -807,7 +807,7 @@ cSetup::cSetup(void) OSDheight = 18; OSDMessageTime = 1; MaxVideoFileSize = MAXVIDEOFILESIZE; - MinEventTimeout = 120; + MinEventTimeout = 30; MinUserInactivity = 120; CurrentChannel = -1; } @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: config.h 1.72 2001/09/02 15:45:17 kls Exp $ + * $Id: config.h 1.73 2001/09/03 15:31:06 kls Exp $ */ #ifndef __CONFIG_H @@ -19,7 +19,7 @@ #include "eit.h" #include "tools.h" -#define VDRVERSION "0.94" +#define VDRVERSION "0.95" #define MaxBuffer 10000 @@ -22,7 +22,7 @@ * * The project's page is at http://www.cadsoft.de/people/kls/vdr * - * $Id: vdr.c 1.68 2001/09/01 14:50:40 kls Exp $ + * $Id: vdr.c 1.69 2001/09/07 15:37:26 kls Exp $ */ #define _GNU_SOURCE @@ -50,6 +50,7 @@ #define ACTIVITYTIMEOUT 60 // seconds before starting housekeeping #define SHUTDOWNWAIT 300 // seconds to wait in user prompt before automatic shutdown +#define MANUALSTART 600 // seconds the next timer must be in the future to assume manual start static int Interrupted = 0; @@ -456,15 +457,19 @@ int main(int argc, char *argv[]) cTimer *timer = Timers.GetNextActiveTimer(); time_t Next = timer ? timer->StartTime() : 0; time_t Delta = timer ? Next - Now : 0; - if (timer) - dsyslog(LOG_INFO, "next timer event at %s", ctime(&Next)); - if (!Next || Delta > Setup.MinEventTimeout * 60) { - if (!LastActivity) { + if (!LastActivity) { + if (!timer || Delta > MANUALSTART) { // Apparently the user started VDR manually dsyslog(LOG_INFO, "assuming manual start of VDR"); LastActivity = Now; - continue; // skip the rest of the housekeeping for now + continue; // don't run into the actual shutdown procedure below } + else + LastActivity = 1; + } + if (!Next || Delta > Setup.MinEventTimeout * 60) { + if (timer) + dsyslog(LOG_INFO, "next timer event at %s", ctime(&Next)); if (WatchdogTimeout > 0) signal(SIGALRM, SIG_IGN); if (Interface->Confirm(tr("Press any key to cancel shutdown"), LastActivity == 1 ? 5 : SHUTDOWNWAIT, true)) { |