summaryrefslogtreecommitdiff
path: root/vdr.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2018-02-25 13:26:17 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2018-02-25 13:26:17 +0100
commit6600478675add5e26e8af97c8de8b972a0cc1230 (patch)
treeb4b639951b5b628fa857e650b6976c33ca700a26 /vdr.c
parentbbbc36a1e63b39db9fb985e9b5c5a4a24ea2f4a2 (diff)
downloadvdr-6600478675add5e26e8af97c8de8b972a0cc1230.tar.gz
vdr-6600478675add5e26e8af97c8de8b972a0cc1230.tar.bz2
Moved handling remote timers into cSVDRPClientHandler::ProcessConnections()
Diffstat (limited to 'vdr.c')
-rw-r--r--vdr.c21
1 files changed, 4 insertions, 17 deletions
diff --git a/vdr.c b/vdr.c
index 78afa872..1e012a2e 100644
--- a/vdr.c
+++ b/vdr.c
@@ -22,7 +22,7 @@
*
* The project's page is at http://www.tvdr.de
*
- * $Id: vdr.c 4.21 2017/11/09 16:15:34 kls Exp $
+ * $Id: vdr.c 4.22 2018/02/25 13:07:09 kls Exp $
*/
#include <getopt.h>
@@ -1081,25 +1081,18 @@ int main(int argc, char *argv[])
{
// Timers and Recordings:
bool TimersModified = false;
- bool TriggerRemoteTimerPoll = false;
static cStateKey TimersStateKey(true);
- if (cTimers::GetTimersRead(TimersStateKey)) {
- TriggerRemoteTimerPoll = true;
+ if (cTimers::GetTimersRead(TimersStateKey))
TimersStateKey.Remove();
- }
cTimers *Timers = cTimers::GetTimersWrite(TimersStateKey);
- // Get remote timers:
- TimersModified |= Timers->GetRemoteTimers();
// Assign events to timers:
static cStateKey SchedulesStateKey;
if (const cSchedules *Schedules = cSchedules::GetSchedulesRead(SchedulesStateKey))
TimersModified |= Timers->SetEvents(Schedules);
// Must do all following calls with the exact same time!
// Process ongoing recordings:
- if (cRecordControls::Process(Timers, Now)) {
+ if (cRecordControls::Process(Timers, Now))
TimersModified = true;
- TriggerRemoteTimerPoll = true;
- }
// Must keep the lock on the schedules until after processing the record
// controls, in order to avoid short interrupts in case the current event
// is replaced by a new one (which some broadcasters do, instead of just
@@ -1113,7 +1106,6 @@ int main(int argc, char *argv[])
else
LastTimerChannel = Timer->Channel()->Number();
TimersModified = true;
- TriggerRemoteTimerPoll = true;
}
// Make sure timers "see" their channel early enough:
static time_t LastTimerCheck = 0;
@@ -1168,13 +1160,8 @@ int main(int argc, char *argv[])
LastTimerCheck = Now;
}
// Delete expired timers:
- if (Timers->DeleteExpired()) {
+ if (Timers->DeleteExpired())
TimersModified = true;
- TriggerRemoteTimerPoll = true;
- }
- // Trigger remote timer polls:
- if (TriggerRemoteTimerPoll)
- Timers->TriggerRemoteTimerPoll();
// Make sure there is enough free disk space for ongoing recordings:
AssertFreeDiskSpace(Timers->GetMaxPriority());
TimersStateKey.Remove(TimersModified);