[mythtv] possible error in auto-shutdown routine

Marc Kessels kessels at rijnh.nl
Thu Mar 4 14:41:49 EST 2004

At 18:58 4-3-2004, you wrote:
>Hi Marc,
> > Maybe Christian Hoenig (the author of this code, if I am not mistaking) can
> > comment on this.
>I try to :)
thanks :-)

----8<---- snip ----8<----
> > line 919 and 920 contain the error if I am not mistaking: I suppose the
> > assignment should be a compare (==) because now recIter contains the first
>Here  the = is perfectly correct there, because I only reset the recIter to
>the first Item and when this is != .end(), there is data in the list.
>The reclist *should* be sorted, so the first item in reclist should be the
>first recording.
>But I do not get the point here, sorry. Could you reelaborate? :)

Well I do also suppose that the list is sorted, but I found that after a 
recording has finished, it is still in the reclist. Therefor the calculated 
time to the "next" starting time is a negative number (pointing to the 
starting time of the last recording which took place). This will never be 
larger than the time set in idleWaitForRecordingTime.
So if indeed recIter should be reset to the beginning of the list (which I 
do not think is necessary, because the code used for the scheduler itself 
lets the recIter point to the next recording.) it should rescan the list to 
see if it is really a recording in the future.

So to solve this problem I think there are two options: either use the next 
recording determined by the scheduler or determine it again.

----8<---- snip ----8<----
> > Also I do not
> > understand why (when using my propsed compare) the recIter==reclist.begin()
> > should be taken as a special case.
>How do you mean a 'special case' ?

since you said that the assignment was necessary, my proposed (sorry for 
the typo) compare is wrong, and the first item in the list is not 
considered as a special case...


More information about the mythtv-dev mailing list