[vdr] vdr-1.3.6 wrong parameter when calling shutdown script

Klaus Schmidinger Klaus.Schmidinger at cadsoft.de
Sat Apr 15 13:31:53 CEST 2006

Helge Lenz wrote:
> Hi,
> since I use 1.3.6 I have problems to shut my system down when there is
> no timer programmed. I tried with a plain vdr-1.3.6 and found out, that
> the "time to next timer"-parameter ($2) is not zero but it seems to be
> the negative current time as t_time. Ok, I could treat number less than
> - -72000 (recording capacity of my system) as zero, because a timer that
> startet that long ago should be finished by now, but maybe somebody
> could have a look onto this.

I just found this rather old posting in my inbox - sorry for not
getting back to you on this earlier...

I believe the fix should look like this:

--- vdr.c       2006/04/15 11:05:49     1.257
+++ vdr.c       2006/04/15 11:29:13
@@ -1132,7 +1132,8 @@
                         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);

Can you confirm this?


More information about the vdr mailing list