summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrank Neumann <fnu@yavdr.org>2017-05-07 10:39:01 +0200
committerFrank Neumann <fnu@yavdr.org>2017-05-07 10:39:01 +0200
commit26a17d704a9396897d17aa12d877ef23eaa5dd50 (patch)
treecb73880b7a2bf489c5007185579ae5f740300279
parentcf9d8e7257ef26b80d3998d4cdb12cd1e39d5e5c (diff)
downloadvdr-plugin-epgsearch-26a17d704a9396897d17aa12d877ef23eaa5dd50.tar.gz
vdr-plugin-epgsearch-26a17d704a9396897d17aa12d877ef23eaa5dd50.tar.bz2
Commit 0003-revert-now-obsolete-pointer-params.diff (thx TomJoad@vdr-portal.de)
-rw-r--r--HISTORY1
-rw-r--r--HISTORY.DE1
-rw-r--r--conflictcheck.c33
-rw-r--r--conflictcheck.h9
-rw-r--r--conflictcheck_thread.c2
-rw-r--r--epgsearchext.c13
-rw-r--r--epgsearchext.h2
-rw-r--r--menu_conflictcheck.c32
-rw-r--r--menu_conflictcheck.h4
-rw-r--r--menu_main.c14
-rw-r--r--menu_main.h2
-rw-r--r--menu_searchresults.c6
-rw-r--r--menu_whatson.c39
-rw-r--r--menu_whatson.h6
-rw-r--r--searchtimer_thread.c11
-rw-r--r--timer_thread.c2
16 files changed, 67 insertions, 110 deletions
diff --git a/HISTORY b/HISTORY
index 613cb11..7ef02bc 100644
--- a/HISTORY
+++ b/HISTORY
@@ -19,6 +19,7 @@ new:
http://www.vdr-portal.de/board1-news/board2-vdr-news/p1271995-skindesigner-1-0-0-neuer-default-skin-estuary4vdr/#post1271995
- Commit 0001-revert-seperate-status-thread.diff by TomJoad@vdr-portal.de
- Commit 0002-fix-incorrect-lock-sequences.diff by TomJoad@vdr-portal.de
+- Commit 0003-revert-now-obsolete-pointer-params.diff by TomJoad@vdr-portal.de
http://www.vdr-portal.de/board17-developer/board21-vdr-plugins/p1291452-epgsearch-f%C3%BCr-vdr-2-3-x/#post1291452
2013-03-xx; Version 1.0.1 - maintenance release
diff --git a/HISTORY.DE b/HISTORY.DE
index 65a90d1..d0ed51d 100644
--- a/HISTORY.DE
+++ b/HISTORY.DE
@@ -19,6 +19,7 @@ neu:
http://www.vdr-portal.de/board1-news/board2-vdr-news/p1271995-skindesigner-1-0-0-neuer-default-skin-estuary4vdr/#post1271995
- Anwenden 0001-revert-seperate-status-thread.diff von TomJoad@vdr-portal.de
- Anwenden 0002-fix-incorrect-lock-sequences.diff von TomJoad@vdr-portal.de
+- Anwenden 0003-revert-now-obsolete-pointer-params.diff von TomJoad@vdr-portal.de
http://www.vdr-portal.de/board17-developer/board21-vdr-plugins/p1291452-epgsearch-f%C3%BCr-vdr-2-3-x/#post1291452
2013-03-xx: Version 1.0.1 - Maintenance Release
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)
diff --git a/conflictcheck.h b/conflictcheck.h
index 75e82e2..940f864 100644
--- a/conflictcheck.h
+++ b/conflictcheck.h
@@ -275,8 +275,6 @@ class cConflictCheck
int numDevices;
time_t maxCheck;
std::vector<eModuleStatus> camSlotStatusArray;
- private:
- void Check_(const cTimers* vdrtimers);
public:
int relevantConflicts;
int numConflicts;
@@ -286,11 +284,8 @@ class cConflictCheck
~cConflictCheck();
void InitDevicesInfo();
void Check();
-#if VDRVERSNUM > 20300
- void Check(const cTimers* vdrtimers);
-#endif
void BondDevices(const char* bondings);
- cList<cConflictCheckTimerObj>* CreateCurrentTimerList(const cTimers* vdrtimers);
+ cList<cConflictCheckTimerObj>* CreateCurrentTimerList();
cList<cConflictCheckTime>* CreateEvaluationTimeList(cList<cConflictCheckTimerObj>*);
cList<cConflictCheckTime>* CreateConflictList(cList<cConflictCheckTime>*, cList<cConflictCheckTimerObj>* timerList);
int GetDevice(cConflictCheckTimerObj* TimerObj, bool *NeedsDetachReceivers);
@@ -298,7 +293,7 @@ class cConflictCheck
cList<cConflictCheckTimerObj>* GetTimers() { return timerList; }
void AddConflict(cConflictCheckTimerObj* TimerObj, cConflictCheckTime* Checktime, std::set<cConflictCheckTimerObj*>& pendingTimers);
int ProcessCheckTime(cConflictCheckTime* checkTime);
- bool TimerInConflict(const cTimers* vdrtimers, const cTimer*);
+ bool TimerInConflict(const cTimer*);
void EvaluateConflCheckCmd();
eModuleStatus CamSlotModuleStatus(cCamSlot *CamSlot);
};
diff --git a/conflictcheck_thread.c b/conflictcheck_thread.c
index 8c52d85..91a14a4 100644
--- a/conflictcheck_thread.c
+++ b/conflictcheck_thread.c
@@ -104,7 +104,7 @@ void cConflictCheckThread::Action(void)
m_forceUpdate = false;
#if VDRVERSNUM > 20300
{
- LOCK_TIMERS_READ;
+ LOCK_TIMERS_WRITE;
}
#else
if (Timers.BeingEdited())
diff --git a/epgsearchext.c b/epgsearchext.c
index 28ea0b5..5d45f8a 100644
--- a/epgsearchext.c
+++ b/epgsearchext.c
@@ -1304,8 +1304,7 @@ void cSearchExt::CheckExistingRecordings(cSearchResults* pResults)
LogFile.Log(3,"analysing existing recordings for search timer '%s'...", search);
// how many recordings do we already have?
- cRecordings *vdrrecordings = NULL;
- int num = GetCountRecordings(vdrrecordings);
+ int num = GetCountRecordings();
cSearchResult* pResultObj = NULL;
int remain = pauseOnNrRecordings - num;
@@ -1433,17 +1432,15 @@ cTimerObjList* cSearchExt::GetTimerList(const cTimers* vdrtimers, cTimerObjList*
}
// counts the currently existent recordings triggered by this search timer
-int cSearchExt::GetCountRecordings(cRecordings *vdrrecordings)
+int cSearchExt::GetCountRecordings()
{
int countRecs = 0;
#if VDRVERSNUM > 20300
- if (!vdrrecordings) {
- LOCK_RECORDINGS_READ;
- vdrrecordings = (cRecordings *)Recordings;
- }
+ LOCK_RECORDINGS_READ;
+ const cRecordings *vdrrecordings = Recordings;
#else
- vdrrecordings = &Recordings;
+ cRecordings *vdrrecordings = &Recordings;
#endif
for (const cRecording *recording = vdrrecordings->First(); recording; recording = vdrrecordings->Next(recording))
{
diff --git a/epgsearchext.h b/epgsearchext.h
index 5cd1ab1..1177817 100644
--- a/epgsearchext.h
+++ b/epgsearchext.h
@@ -201,7 +201,7 @@ public:
void OnOffTimers(bool);
void DeleteAllTimers();
cTimerObjList* GetTimerList(const cTimers* vdrtimers, cTimerObjList* timerList);
- int GetCountRecordings(cRecordings *vdrrecordings);
+ int GetCountRecordings();
bool IsActiveAt(time_t t);
bool HasContent(int contentID);
void SetContentFilter(int* contentStringsFlags);
diff --git a/menu_conflictcheck.c b/menu_conflictcheck.c
index 6f0ab61..7534878 100644
--- a/menu_conflictcheck.c
+++ b/menu_conflictcheck.c
@@ -172,12 +172,18 @@ cMenuConflictCheckDetailsItem::cMenuConflictCheckDetailsItem(cConflictCheckTimer
cTimers *vdrtimers = &Timers;
#endif
hasTimer = timerObj->OrigTimer(vdrtimers)?timerObj->OrigTimer(vdrtimers)->HasFlags(tfActive):false;
- Update(vdrtimers, true);
+ Update(true);
}
-bool cMenuConflictCheckDetailsItem::Update(const cTimers* vdrtimers, bool Force)
+bool cMenuConflictCheckDetailsItem::Update(bool Force)
{
bool oldhasTimer = hasTimer;
+#if VDRVERSNUM > 20300
+ LOCK_TIMERS_READ;
+ const cTimers *vdrtimers = Timers;
+#else
+ cTimers *vdrtimers = &Timers;
+#endif
hasTimer = timerObj->OrigTimer(vdrtimers)?timerObj->OrigTimer(vdrtimers)->HasFlags(tfActive):false;
if (Force || hasTimer != oldhasTimer)
{
@@ -283,16 +289,16 @@ eOSState cMenuConflictCheckDetails::ToggleTimer(cConflictCheckTimerObj* TimerObj
if (!TimerObj || !TimerObj->OrigTimer(vdrtimers)) return osContinue;
TimerObj->OrigTimer(vdrtimers)->OnOff(); // Toggles Timer Flag
vdrtimers->SetModified();
- Update(vdrtimers);
+ Update();
Display();
return osContinue;
}
-bool cMenuConflictCheckDetails::Update(const cTimers* vdrtimers, bool Force)
+bool cMenuConflictCheckDetails::Update(bool Force)
{
bool result = false;
for (cOsdItem *item = First(); item; item = Next(item)) {
- if (item->Selectable() && ((cMenuConflictCheckDetailsItem *)item)->Update(vdrtimers, Force))
+ if (item->Selectable() && ((cMenuConflictCheckDetailsItem *)item)->Update(Force))
result = true;
}
return result;
@@ -440,12 +446,12 @@ eOSState cMenuConflictCheckDetails::ProcessKey(eKeys Key)
{
bool found = false;
#if VDRVERSNUM > 20300
- LOCK_TIMERS_WRITE;
- cTimers *vdrtimers = Timers;
+ LOCK_TIMERS_READ;
+ const cTimers *vdrtimers = Timers;
#else
- cTimers *vdrtimers = &Timers;
+ const cTimers *vdrtimers = &Timers;
#endif
- for(cTimer* checkT = vdrtimers->First(); checkT; checkT = vdrtimers->Next(checkT))
+ for(const cTimer* checkT = vdrtimers->First(); checkT; checkT = vdrtimers->Next(checkT))
{
checkT->Matches();
if (checkT == (*it)->OrigTimer(vdrtimers)) // ok -> found, check for changes
@@ -481,13 +487,7 @@ eOSState cMenuConflictCheckDetails::ProcessKey(eKeys Key)
if (Key != kNone)
SetHelpKeys();
-#if VDRVERSNUM > 20300
- LOCK_TIMERS_READ;
- const cTimers *vdrtimers = Timers;
-#else
- cTimers *vdrtimers = &Timers;
-#endif
- if ((HadSubMenu || gl_TimerProgged) && Update(vdrtimers, true))
+ if ((HadSubMenu || gl_TimerProgged) && Update(true))
{
if (gl_TimerProgged) // when using epgsearch's timer edit menu, update is delayed because of SVDRP
{
diff --git a/menu_conflictcheck.h b/menu_conflictcheck.h
index e7a858e..e8d48d0 100644
--- a/menu_conflictcheck.h
+++ b/menu_conflictcheck.h
@@ -56,7 +56,7 @@ class cMenuConflictCheckDetailsItem : public cOsdItem {
public:
cConflictCheckTimerObj* timerObj;
cMenuConflictCheckDetailsItem(cConflictCheckTimerObj* TimerObj = NULL);
- bool Update(const cTimers *vdrtimers, bool Force = false);
+ bool Update(bool Force = false);
};
// --- cMenuConflictCheckDetails ------------------------------------------------------
@@ -73,7 +73,7 @@ private:
void SetHelpKeys();
eOSState ToggleTimer(cConflictCheckTimerObj* TimerObj);
eOSState DeleteTimer(cConflictCheckTimerObj* TimerObj);
- bool Update(const cTimers* vdrtimers, bool Force = false);
+ bool Update(bool Force = false);
bool BuildList();
eOSState ShowSummary();
void UpdateCurrent();
diff --git a/menu_main.c b/menu_main.c
index e776599..9b541dc 100644
--- a/menu_main.c
+++ b/menu_main.c
@@ -174,11 +174,11 @@ void cMenuSearchMain::PrepareSchedule(const cChannel *Channel)
}
}
-bool cMenuSearchMain::Update(const cTimers* vdrtimers)
+bool cMenuSearchMain::Update(void)
{
bool result = false;
for (cOsdItem *item = First(); item; item = Next(item)) {
- if (item->Selectable() && ((cMenuMyScheduleItem *)item)->Update(vdrtimers))
+ if (item->Selectable() && ((cMenuMyScheduleItem *)item)->Update())
result = true;
}
return result;
@@ -280,7 +280,7 @@ eOSState cMenuSearchMain::Record(void)
if (HasSubMenu())
CloseSubMenu();
- if (Update(vdrtimers))
+ if (Update())
Display();
SetHelpKeys();
}
@@ -599,12 +599,6 @@ eOSState cMenuSearchMain::ProcessKey(eKeys Key)
const cChannel *ch = cMenuWhatsOnSearch::ScheduleChannel();
InWhatsOnMenu = false;
InFavoritesMenu = false;
-#if VDRVERSNUM > 20300
- LOCK_TIMERS_READ;
- const cTimers *vdrtimers = Timers;
-#else
- cTimers *vdrtimers = &Timers;
-#endif
if (ch) {
// when switch from the other menus to the schedule, try to keep the same time
if (cMenuWhatsOnSearch::shiftTime)
@@ -621,7 +615,7 @@ eOSState cMenuSearchMain::ProcessKey(eKeys Key)
}
Display();
}
- else if ((HadSubMenu || gl_TimerProgged) && Update(vdrtimers))
+ else if ((HadSubMenu || gl_TimerProgged) && Update())
{
if (gl_TimerProgged) // when using epgsearch's timer edit menu, update is delayed because of SVDRP
{
diff --git a/menu_main.h b/menu_main.h
index 26452bf..845a1ef 100644
--- a/menu_main.h
+++ b/menu_main.h
@@ -53,7 +53,7 @@ class cMenuSearchMain : public cOsdMenu {
eOSState Switch(void);
eOSState Shift(int iMinutes);
eOSState ShowSummary();
- bool Update(const cTimers *vdrtimers);
+ bool Update(void);
void UpdateCurrent();
#ifdef USE_GRAPHTFT
virtual const char* MenuKind() { return "MenuEpgsSchedule"; }
diff --git a/menu_searchresults.c b/menu_searchresults.c
index 82cbe03..0608244 100644
--- a/menu_searchresults.c
+++ b/menu_searchresults.c
@@ -171,12 +171,8 @@ bool cMenuSearchResultsItem::Update(const cTimers* vdrtimers, bool Force)
if (EPGSearchConfig.checkTimerConflAfterTimerProg && !Force && timer && timerMatch && timerMatch != OldTimerMatch)
{
cConflictCheck C;
-#if VDRVERSNUM > 20300
- C.Check(vdrtimers);
-#else
C.Check();
-#endif
- if (C.TimerInConflict(vdrtimers, timer))
+ if (C.TimerInConflict(timer))
gl_InfoConflict = 1;
}
diff --git a/menu_whatson.c b/menu_whatson.c
index b99a0db..dd3ca44 100644
--- a/menu_whatson.c
+++ b/menu_whatson.c
@@ -63,16 +63,10 @@ cMenuMyScheduleItem::cMenuMyScheduleItem(const cEvent *Event, const cChannel *Ch
timerMatch = tmNone;
inSwitchList = false;
menuTemplate = MenuTemplate;
-#if VDRVERSNUM > 20300
- LOCK_TIMERS_READ;
- const cTimers *vdrtimers = Timers;
-#else
- cTimers *vdrtimers = &Timers;
-#endif
- Update(vdrtimers, true);
+ Update(true);
}
-bool cMenuMyScheduleItem::Update(const cTimers* vdrtimers, bool Force)
+bool cMenuMyScheduleItem::Update(bool Force)
{
if (!menuTemplate)
return false;
@@ -88,8 +82,11 @@ bool cMenuMyScheduleItem::Update(const cTimers* vdrtimers, bool Force)
bool hasMatch = false;
const cTimer* timer = NULL;
#if VDRVERSNUM > 20300
+ LOCK_TIMERS_READ;
+ const cTimers *vdrtimers = Timers;
if (event) timer = vdrtimers->GetMatch(event, &timerMatch);
#else
+ cTimers *vdrtimers = &Timers;
if (event) timer = ((cTimers*)vdrtimers)->GetMatch(event, &timerMatch);
#endif
if (event) inSwitchList = (SwitchTimers.InSwitchList(event)!=NULL);
@@ -249,7 +246,7 @@ bool cMenuMyScheduleItem::Update(const cTimers* vdrtimers, bool Force)
{
cConflictCheck C;
C.Check();
- if (C.TimerInConflict(vdrtimers, timer))
+ if (C.TimerInConflict(timer))
gl_InfoConflict = 1;
}
return true;
@@ -274,13 +271,7 @@ cMenuMyScheduleSepItem::cMenuMyScheduleSepItem(const cEvent *Event, const cChann
channel = Channel;
dummyEvent = NULL;
SetSelectable(false);
-#if VDRVERSNUM > 20300
- LOCK_TIMERS_READ;
- const cTimers *vdrtimers = Timers;
-#else
- cTimers *vdrtimers = &Timers;
-#endif
- Update(vdrtimers, true);
+ Update(true);
}
cMenuMyScheduleSepItem::~cMenuMyScheduleSepItem()
@@ -289,7 +280,7 @@ cMenuMyScheduleSepItem::~cMenuMyScheduleSepItem()
delete dummyEvent;
}
-bool cMenuMyScheduleSepItem::Update(const cTimers* vdrtimer, bool Force)
+bool cMenuMyScheduleSepItem::Update(bool Force)
{
if (channel)
SetText(cString::sprintf("%s\t %s %s", MENU_SEPARATOR_ITEMS, channel->Name(), MENU_SEPARATOR_ITEMS));
@@ -679,7 +670,7 @@ eOSState cMenuWhatsOnSearch::Record(void)
if (HasSubMenu())
CloseSubMenu();
- if (Update(vdrtimers))
+ if (Update())
Display();
SetHelpKeys();
}
@@ -687,11 +678,11 @@ eOSState cMenuWhatsOnSearch::Record(void)
return osContinue;
}
-bool cMenuWhatsOnSearch::Update(const cTimers* vdrtimers)
+bool cMenuWhatsOnSearch::Update(void)
{
bool result = false;
for (cOsdItem *item = First(); item; item = Next(item)) {
- if (item->Selectable() && ((cMenuMyScheduleItem *)item)->Update(vdrtimers))
+ if (item->Selectable() && ((cMenuMyScheduleItem *)item)->Update())
result = true;
}
return result;
@@ -966,13 +957,7 @@ eOSState cMenuWhatsOnSearch::ProcessKey(eKeys Key)
}
if (!HasSubMenu())
{
-#if VDRVERSNUM > 20300
- LOCK_TIMERS_READ;
- const cTimers *vdrtimers = Timers;
-#else
- cTimers *vdrtimers = &Timers;
-#endif
- if ((HadSubMenu || gl_TimerProgged) && Update(vdrtimers))
+ if ((HadSubMenu || gl_TimerProgged) && Update())
{
if (gl_TimerProgged) // when using epgsearch's timer edit menu, update is delayed because of SVDRP
{
diff --git a/menu_whatson.h b/menu_whatson.h
index 34d6de3..4c65bd6 100644
--- a/menu_whatson.h
+++ b/menu_whatson.h
@@ -40,7 +40,7 @@ public:
cMenuTemplate* menuTemplate;
cMenuMyScheduleItem(const cEvent *Event, const cChannel *Channel = NULL, showMode ShowMode = showNow, cMenuTemplate* menuTemplate = NULL);
- virtual bool Update(const cTimers* vdrtimers, bool Force = false);
+ virtual bool Update(bool Force = false);
virtual void SetMenuItem(cSkinDisplayMenu *DisplayMenu, int Index, bool Current, bool Selectable);
};
@@ -54,7 +54,7 @@ public:
cMenuMyScheduleSepItem(const cEvent *Event, const cChannel *Channel = NULL);
~cMenuMyScheduleSepItem();
- virtual bool Update(const cTimers* vdrtimers, bool Force = false);
+ virtual bool Update(bool Force = false);
virtual void SetMenuItem(cSkinDisplayMenu *DisplayMenu, int Index, bool Current, bool Selectable);
};
@@ -88,7 +88,7 @@ private:
virtual eOSState ShowSummary();
void SetHelpKeys(bool Force = false);
int GetTab(int Tab);
- bool Update(const cTimers* vdrtimers);
+ bool Update(void);
void CreateShowModes();
static cShowMode* GetShowMode(showMode mode);
void UpdateCurrent();
diff --git a/searchtimer_thread.c b/searchtimer_thread.c
index 9ee5957..051c90d 100644
--- a/searchtimer_thread.c
+++ b/searchtimer_thread.c
@@ -237,7 +237,7 @@ void cSearchTimerThread::Action(void)
#if VDRVERSNUM > 20300
// wait if TimersWriteLock is set or waited for
{
- LOCK_TIMERS_READ;
+ LOCK_TIMERS_WRITE;
}
#else
if (Timers.BeingEdited())
@@ -716,7 +716,6 @@ bool cSearchTimerThread::AddModTimer(cTimer* Timer, int index, cSearchExt* searc
time_t start = eStart - (searchExt->MarginStart * 60);
time_t stop = eStop + (searchExt->MarginStop * 60);
int Flags = Timer->Flags();
- LogFile.Log(1, "AddModTimer"); //JF
if (searchExt->useVPS && pEvent->Vps() && Setup.UseVps)
{
start = pEvent->Vps();
@@ -778,12 +777,10 @@ bool cSearchTimerThread::AddModTimer(cTimer* Timer, int index, cSearchExt* searc
if (!SendViaSVDRP(cmdbuf))
return false;
- LogFile.Log(1, "AddModTimer SVDRP done"); //JF
#if VDRVERSNUM > 20300
}
if (!HandleRemoteTimerModifications(Timer))
return false;
- LogFile.Log(1, "AddModTimer HandleRemoteTimerModifications done"); //JF
#endif
if (gl_timerStatusMonitor) gl_timerStatusMonitor->SetConflictCheckAdvised();
@@ -897,7 +894,7 @@ void cSearchTimerThread::CheckExpiredRecs()
{
cRecording* recording = recordingObj->recording;
cSearchExt* search = recordingObj->search;
- if (search->recordingsKeep > 0 && search->recordingsKeep >= search->GetCountRecordings(vdrrecordings))
+ if (search->recordingsKeep > 0 && search->recordingsKeep >= search->GetCountRecordings())
{
#if APIVERSNUM < 10721
LogFile.Log(1, "recording '%s' from %s expired, but will be kept, search timer %s", recording->Name(), DAYDATETIME(recording->start), recordingObj->search->search);
@@ -968,8 +965,8 @@ void cSearchTimerThread::CheckManualTimers(void)
LogFile.Log(1, "manual timer check started");
#if VDRVERSNUM > 20300
- LOCK_TIMERS_WRITE; // to be checked !!!
- cTimers *vdrtimers = Timers;
+ LOCK_TIMERS_READ;
+ const cTimers *vdrtimers = Timers;
LOCK_SCHEDULES_READ;
const cSchedules *schedules = Schedules;
#else
diff --git a/timer_thread.c b/timer_thread.c
index e4c8be1..f319426 100644
--- a/timer_thread.c
+++ b/timer_thread.c
@@ -91,7 +91,7 @@ void cTimerThread::Action(void)
}
#if VDRVERSNUM > 20300
{
- LOCK_TIMERS_READ;
+ LOCK_TIMERS_WRITE;
}
#else
if (Timers.BeingEdited())