summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTORS4
-rw-r--r--HISTORY2
-rw-r--r--vdr.c5
3 files changed, 9 insertions, 2 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 8345303e..7d92a12a 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -1830,3 +1830,7 @@ Tobias Grimm <listaccount@e-tobi.net>
Peter Dittmann <peter.dittmann@philips.com>
for a patch that was used as a base to implement cPlugin::Active()
+
+Helge Lenz <h.lenz@gmx.de>
+ for reporting a bug in setting the 'Delta' parameter when calling the shutdown
+ script with no active timer
diff --git a/HISTORY b/HISTORY
index facf7f1b..99746a95 100644
--- a/HISTORY
+++ b/HISTORY
@@ -4526,3 +4526,5 @@ Video Disk Recorder Revision History
- The new function cPlugin::Active() can be used by a plugin to indicate that it
is still busy and the system should not shut down or restart (based on a patch
from Peter Dittmann). See PLUGINS.html for details.
+- Fixed setting the 'Delta' parameter when calling the shutdown script with
+ no active timer (reported by Helge Lenz).
diff --git a/vdr.c b/vdr.c
index 1583f9da..f11088fb 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.257 2006/04/15 11:05:49 kls Exp $
+ * $Id: vdr.c 1.258 2006/04/15 11:29:13 kls Exp $
*/
#include <getopt.h>
@@ -1132,7 +1132,8 @@ int main(int argc, char *argv[])
cControl::Shutdown();
int Channel = timer ? timer->Channel()->Number() : 0;
const char *File = timer ? timer->File() : "";
- Delta = Next - time(NULL); // compensates for Confirm() timeout
+ if (timer)
+ Delta = Next - time(NULL); // compensates for Confirm() timeout
char *cmd;
asprintf(&cmd, "%s %ld %ld %d \"%s\" %d", Shutdown, Next, Delta, Channel, *strescape(File, "\"$"), UserShutdown);
isyslog("executing '%s'", cmd);