mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Now adjusting spawned timers before setting events to timers
This commit is contained in:
parent
ebd92dcd31
commit
65aafacd8e
1
HISTORY
1
HISTORY
@ -9650,3 +9650,4 @@ Video Disk Recorder Revision History
|
|||||||
an immediate respawn on the remote machine, because at that time the event on the remote
|
an immediate respawn on the remote machine, because at that time the event on the remote
|
||||||
machine was still covered by the initial timer (which, from the remote machine's standpoint,
|
machine was still covered by the initial timer (which, from the remote machine's standpoint,
|
||||||
was "remote").
|
was "remote").
|
||||||
|
- Now adjusting spawned timers before setting events to timers.
|
||||||
|
10
vdr.c
10
vdr.c
@ -22,7 +22,7 @@
|
|||||||
*
|
*
|
||||||
* The project's page is at http://www.tvdr.de
|
* The project's page is at http://www.tvdr.de
|
||||||
*
|
*
|
||||||
* $Id: vdr.c 5.3 2021/04/06 10:00:27 kls Exp $
|
* $Id: vdr.c 5.4 2021/04/10 11:32:50 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
@ -1107,10 +1107,14 @@ int main(int argc, char *argv[])
|
|||||||
bool TimersModified = false;
|
bool TimersModified = false;
|
||||||
if (const cSchedules *Schedules = cSchedules::GetSchedulesRead(SchedulesStateKey)) {
|
if (const cSchedules *Schedules = cSchedules::GetSchedulesRead(SchedulesStateKey)) {
|
||||||
Timers->SetSyncStateKey(StateKeySVDRPRemoteTimersPoll); // setting events shall not trigger a remote timer poll...
|
Timers->SetSyncStateKey(StateKeySVDRPRemoteTimersPoll); // setting events shall not trigger a remote timer poll...
|
||||||
|
if (Timers->AdjustSpawnedTimers()) { // must do this *before* SetEvents()!
|
||||||
|
StateKeySVDRPRemoteTimersPoll.Reset(); // ...but adjusting spawned timers...
|
||||||
|
TimersModified = true;
|
||||||
|
}
|
||||||
if (Timers->SetEvents(Schedules))
|
if (Timers->SetEvents(Schedules))
|
||||||
TimersModified = true;
|
TimersModified = true;
|
||||||
if (Timers->SpawnPatternTimers(Schedules) | Timers->AdjustSpawnedTimers()) { // this really is '|', not '||'!
|
if (Timers->SpawnPatternTimers(Schedules)) {
|
||||||
StateKeySVDRPRemoteTimersPoll.Reset(); // ...but spawning new timers or adjusting spawned timers must!
|
StateKeySVDRPRemoteTimersPoll.Reset(); // ...or spawning new timers must!
|
||||||
TimersModified = true;
|
TimersModified = true;
|
||||||
}
|
}
|
||||||
SchedulesStateKey.Remove();
|
SchedulesStateKey.Remove();
|
||||||
|
Loading…
Reference in New Issue
Block a user