Opened 12 years ago

Closed 11 years ago

#4971 closed defect (fixed)

HouseKeeper::wantToRun() randomization incorrect for maxhour < hour

Reported by: stefan.becker@… Owned by: Isaac Richards
Priority: minor Milestone: unknown
Component: mythtv Version: 0.21-fixes
Severity: low Keywords:
Cc: Ticket locked: no

Description

For the case

minhour > maxhour (i.e. window includes midnight) hour > maxhour (i.e. before midnight)

the first term of the formula in HouseKeeper::wantToRun()

(maxhour-hour)*12+(60-minute)/5...

turns negative. That negative value is then used for a modulo division...

Attachments (2)

mythtv-0.21-wanttorun-hour-bigger-than-maxhour.patch (1.5 KB) - added by stefan.becker@… 12 years ago.
Add ((24 + ...)%24) to make sure the value is always positive
mythtv-0.21-wanttorun-hour-bigger-than-maxhour.2.patch (1.5 KB) - added by stefan.becker@… 12 years ago.
Corrected comment

Download all attachments as: .zip

Change History (3)

Changed 12 years ago by stefan.becker@…

Add ((24 + ...)%24) to make sure the value is always positive

Changed 12 years ago by stefan.becker@…

Corrected comment

comment:1 Changed 11 years ago by cpinkham

Resolution: fixed
Status: newclosed

(In [21381]) Fix the randomization calculation for running mythfilldatabase in the housekeeper. When hour > minhour > maxhour, part of the calculation would turn into a negative number which in turn did not give the desired effect.

Closes #4971 using partial patch by Stefan Becker.

Note: See TracTickets for help on using tickets.