[Patch] Fix calculating starttime of repeated timers with start date

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Udo Richter wrote:
> Udo Richter wrote:
>> The original patch did not attempt to fix Skip(), it just fixes the 
>> wrong calculation of StartTime(). Skip() could be fixed by this 
>> additional patch: (untested!)
> 
> Well, that was really untested. This one *is* tested:
> 
> --- timers.c.orig    2006-05-20 18:50:49.000000000 +0200
> +++ timers.c    2006-05-22 22:19:02.134688704 +0200
> @@ -560,6 +560,9 @@
>  void cTimer::Skip(void)
>  {
>    day = IncDay(SetTime(StartTime(), 0), 1);
> +  startTime = 0;
> +  day = SetTime(StartTime(), 0);
> +  startTime = 0;
>    SetEvent(NULL);
>  }

I'm afraid this might have a nasty side effect.
Imagine the following scenario:

- a weekly timer that records on Mondays at 20:00
- at Monday, 19:00 the user decides to skip today's recording,
   so he presses the red button on the timer
- some time later he decides to make this timer also record
   on Tuesdays, so he edits the timer and sets the day flag for
   Tuesday by pressing '2'

The way it is now, the timer would record as the user
expects it to. With your patch he would also have to manually
set the "first day" correctly, otherwise the additional Tuesday
recording wouldn't take place.

I think I prefer to leave cTimer::Skip() as it is, and only
adopt your original patch.

Klaus


[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux