diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2006-04-15 11:33:34 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2006-04-15 11:33:34 +0200 |
commit | b49df33917938bac6b57d7a122133cbe0b6b3d39 (patch) | |
tree | 91a23f47c22c38b73907094df400e50ec3129edb /vdr.c | |
parent | 4ba450b7372709507a8602ae5c80b47ef39b6d38 (diff) | |
download | vdr-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.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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); |