summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2021-04-10 11:32:50 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2021-04-10 11:32:50 +0200
commit65aafacd8e6e9e3948bbd94f9bcc1720afbfb5b4 (patch)
treee486ba6d5f2180e3080f260e819590a321efa0b8
parentebd92dcd310e8fa1381e8e6488657aca7d92f547 (diff)
downloadvdr-65aafacd8e6e9e3948bbd94f9bcc1720afbfb5b4.tar.gz
vdr-65aafacd8e6e9e3948bbd94f9bcc1720afbfb5b4.tar.bz2
Now adjusting spawned timers before setting events to timers
-rw-r--r--HISTORY1
-rw-r--r--vdr.c10
2 files changed, 8 insertions, 3 deletions
diff --git a/HISTORY b/HISTORY
index 3cda625c..f9ba6686 100644
--- a/HISTORY
+++ b/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
machine was still covered by the initial timer (which, from the remote machine's standpoint,
was "remote").
+- Now adjusting spawned timers before setting events to timers.
diff --git a/vdr.c b/vdr.c
index 433645ae..47faf486 100644
--- a/vdr.c
+++ b/vdr.c
@@ -22,7 +22,7 @@
*
* 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>
@@ -1107,10 +1107,14 @@ int main(int argc, char *argv[])
bool TimersModified = false;
if (const cSchedules *Schedules = cSchedules::GetSchedulesRead(SchedulesStateKey)) {
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))
TimersModified = true;
- if (Timers->SpawnPatternTimers(Schedules) | Timers->AdjustSpawnedTimers()) { // this really is '|', not '||'!
- StateKeySVDRPRemoteTimersPoll.Reset(); // ...but spawning new timers or adjusting spawned timers must!
+ if (Timers->SpawnPatternTimers(Schedules)) {
+ StateKeySVDRPRemoteTimersPoll.Reset(); // ...or spawning new timers must!
TimersModified = true;
}
SchedulesStateKey.Remove();