diff options
author | Frank Neumann <fnu@yavdr.org> | 2017-05-07 10:39:01 +0200 |
---|---|---|
committer | Frank Neumann <fnu@yavdr.org> | 2017-05-07 10:39:01 +0200 |
commit | 26a17d704a9396897d17aa12d877ef23eaa5dd50 (patch) | |
tree | cb73880b7a2bf489c5007185579ae5f740300279 /conflictcheck.c | |
parent | cf9d8e7257ef26b80d3998d4cdb12cd1e39d5e5c (diff) | |
download | vdr-plugin-epgsearch-26a17d704a9396897d17aa12d877ef23eaa5dd50.tar.gz vdr-plugin-epgsearch-26a17d704a9396897d17aa12d877ef23eaa5dd50.tar.bz2 |
Commit 0003-revert-now-obsolete-pointer-params.diff (thx TomJoad@vdr-portal.de)
Diffstat (limited to 'conflictcheck.c')
-rw-r--r-- | conflictcheck.c | 33 |
1 files changed, 12 insertions, 21 deletions
diff --git a/conflictcheck.c b/conflictcheck.c index 9202df8..1f16f35 100644 --- a/conflictcheck.c +++ b/conflictcheck.c @@ -235,27 +235,14 @@ void cConflictCheck::BondDevices(const char *Bondings) #endif } -#if VDRVERSNUM > 20300 -void cConflictCheck::Check(const cTimers* vdrtimers) -{ - Check_(vdrtimers); -} -#endif - void cConflictCheck::Check() { - const cTimers* vdrtimers = NULL; - Check_(vdrtimers); -} - -void cConflictCheck::Check_(const cTimers* vdrtimers) -{ if (evaltimeList) DELETENULL(evaltimeList); if (timerList) DELETENULL(timerList); - timerList = CreateCurrentTimerList(vdrtimers); + timerList = CreateCurrentTimerList(); if (timerList) evaltimeList = CreateEvaluationTimeList(timerList); if (evaltimeList) failedList = CreateConflictList(evaltimeList, timerList); if (failedList) @@ -272,7 +259,7 @@ void cConflictCheck::Check_(const cTimers* vdrtimers) gl_timerStatusMonitor->SetConflictCheckAdvised(); } -cList<cConflictCheckTimerObj>* cConflictCheck::CreateCurrentTimerList(const cTimers* vdrtimers) +cList<cConflictCheckTimerObj>* cConflictCheck::CreateCurrentTimerList() { LogFile.Log(3,"current timer list creation started"); cList<cConflictCheckTimerObj>* CurrentTimerList = NULL; @@ -280,12 +267,10 @@ cList<cConflictCheckTimerObj>* cConflictCheck::CreateCurrentTimerList(const cTim // collect single event timers time_t tMax = 0; #if VDRVERSNUM > 20300 - if (!vdrtimers) { - LOCK_TIMERS_READ; - vdrtimers = Timers; - } + LOCK_TIMERS_READ; + const cTimers *vdrtimers = Timers; #else - vdrtimers = &Timers; + const cTimers *vdrtimers = &Timers; #endif const cTimer* ti = NULL; for (ti = vdrtimers->First(); ti; ti = vdrtimers->Next(ti)) @@ -694,7 +679,7 @@ void cConflictCheck::AddConflict(cConflictCheckTimerObj* TimerObj, cConflictChec LogFile.Log(3,"conflict found for timer '%s' (%s, channel %s)", TimerObj->timer->File(), DAYDATETIME(TimerObj->start), CHANNELNAME(TimerObj->timer->Channel())); } -bool cConflictCheck::TimerInConflict(const cTimers* vdrtimers, const cTimer* timer) +bool cConflictCheck::TimerInConflict(const cTimer* timer) { for(cConflictCheckTime* checkTime = failedList->First(); checkTime; checkTime = failedList->Next(checkTime)) { @@ -706,6 +691,12 @@ bool cConflictCheck::TimerInConflict(const cTimers* vdrtimers, const cTimer* tim std::set<cConflictCheckTimerObj*,TimerObjSort>::iterator it2; if ((*it)->concurrentTimers) { +#if VDRVERSNUM > 20300 + LOCK_TIMERS_READ; + const cTimers *vdrtimers = Timers; +#else + cTimers *vdrtimers = &Timers; +#endif for (it2 = (*it)->concurrentTimers->begin(); it2 != (*it)->concurrentTimers->end(); ++it2) { if ((*it2)->OrigTimer(vdrtimers) == timer) |