summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2006-08-05 10:55:52 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2006-08-05 10:55:52 +0200
commit394865b3d9c087f982edf21263bb776d1bed1a7c (patch)
treef64d80f84c56a2d8212b0fb94cf5edaf69ce2ac3
parent8bfe599830bad4528b4fa60dddaa3c0b8cb9c80d (diff)
downloadvdr-394865b3d9c087f982edf21263bb776d1bed1a7c.tar.gz
vdr-394865b3d9c087f982edf21263bb776d1bed1a7c.tar.bz2
Avoiding shutdown message "Recording in ... minutes, shut down anyway?" with a negative number of minutes
-rw-r--r--CONTRIBUTORS2
-rw-r--r--HISTORY2
-rw-r--r--vdr.c24
3 files changed, 17 insertions, 11 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index ca3a8432..56ee68dd 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -1457,6 +1457,8 @@ Udo Richter <udo_richter@gmx.de>
plugins
for reporting a missing '--vfat' in the vdr.1 man page
for fixing deleting the last character of a string menu item in insert mode
+ for reporting that the shutdown message "Recording in ... minutes, shut down anyway?"
+ may have been given with a negative number of minutes
Sven Kreiensen <svenk@kammer.uni-hannover.de>
for his help in keeping 'channels.conf.terr' up to date
diff --git a/HISTORY b/HISTORY
index d255834b..210bcb7a 100644
--- a/HISTORY
+++ b/HISTORY
@@ -4854,3 +4854,5 @@ Video Disk Recorder Revision History
event timeout" setup parameter), and the user insists in shutting down now, the
reboot time given to the shutdown script will correspond to a time that is
"Min. event timeout" minutes (default is 30) in the future.
+- Avoiding shutdown message "Recording in ... minutes, shut down anyway?" with
+ a negative number of minutes (reported by Udo Richter).
diff --git a/vdr.c b/vdr.c
index 2698d6bb..436bfada 100644
--- a/vdr.c
+++ b/vdr.c
@@ -22,7 +22,7 @@
*
* The project's page is at http://www.cadsoft.de/vdr
*
- * $Id: vdr.c 1.277 2006/08/05 10:40:57 kls Exp $
+ * $Id: vdr.c 1.278 2006/08/05 10:46:38 kls Exp $
*/
#include <getopt.h>
@@ -1015,16 +1015,18 @@ int main(int argc, char *argv[])
}
if (cPluginManager::Active(tr("shut down anyway?")))
break;
- cTimer *timer = Timers.GetNextActiveTimer();
- time_t Next = timer ? timer->StartTime() : 0;
- time_t Delta = timer ? Next - time(NULL) : 0;
- if (Next && Delta <= Setup.MinEventTimeout * 60) {
- char *buf;
- asprintf(&buf, tr("Recording in %ld minutes, shut down anyway?"), Delta / 60);
- bool confirm = Interface->Confirm(buf);
- free(buf);
- if (!confirm)
- break;
+ if (!cRecordControls::Active()) {
+ cTimer *timer = Timers.GetNextActiveTimer();
+ time_t Next = timer ? timer->StartTime() : 0;
+ time_t Delta = timer ? Next - time(NULL) : 0;
+ if (Next && Delta <= Setup.MinEventTimeout * 60) {
+ char *buf;
+ asprintf(&buf, tr("Recording in %ld minutes, shut down anyway?"), Delta / 60);
+ bool confirm = Interface->Confirm(buf);
+ free(buf);
+ if (!confirm)
+ break;
+ }
}
ForceShutdown = true;
break;