summaryrefslogtreecommitdiff
path: root/vdr.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2006-04-15 11:33:34 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2006-04-15 11:33:34 +0200
commitb49df33917938bac6b57d7a122133cbe0b6b3d39 (patch)
tree91a23f47c22c38b73907094df400e50ec3129edb /vdr.c
parent4ba450b7372709507a8602ae5c80b47ef39b6d38 (diff)
downloadvdr-b49df33917938bac6b57d7a122133cbe0b6b3d39.tar.gz
vdr-b49df33917938bac6b57d7a122133cbe0b6b3d39.tar.bz2
Fixed setting the 'Delta' parameter when calling the shutdown script with no active timer
Diffstat (limited to 'vdr.c')
-rw-r--r--vdr.c5
1 files changed, 3 insertions, 2 deletions
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);