mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Some fixes to the shutdown feature
This commit is contained in:
parent
fa31c70f7d
commit
3b6782a774
7
HISTORY
7
HISTORY
@ -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.
|
||||
|
2
MANUAL
2
MANUAL
@ -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
config.c
4
config.c
@ -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
config.h
4
config.h
@ -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
|
||||
|
||||
|
15
vdr.c
15
vdr.c
@ -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 (!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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user