summaryrefslogtreecommitdiff
path: root/recmanager.c
diff options
context:
space:
mode:
authorkamel5 <vdr.kamel5 (at) gmx (dot) net>2019-07-05 12:39:07 +0200
committerkamel5 <vdr.kamel5 (at) gmx (dot) net>2019-07-05 13:05:19 +0200
commita88154614c3fd0eefb30536fa7ff9d7bfd8ca2c4 (patch)
tree722c1a1f511ca86d679f21aea936471677c5fc78 /recmanager.c
parentdeaece203463f97f1e3a787f40f2cc2560d78826 (diff)
downloadvdr-plugin-tvguideng-a88154614c3fd0eefb30536fa7ff9d7bfd8ca2c4.tar.gz
vdr-plugin-tvguideng-a88154614c3fd0eefb30536fa7ff9d7bfd8ca2c4.tar.bz2
Fixed locking in searchtimer.c and recmanager.c
Diffstat (limited to 'recmanager.c')
-rw-r--r--recmanager.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/recmanager.c b/recmanager.c
index 7dbfc0f..c470073 100644
--- a/recmanager.c
+++ b/recmanager.c
@@ -403,12 +403,14 @@ const cEvent **cRecManager::PerformSearchTimerSearch(std::string epgSearchString
int eventID = atoi(flds[1].c_str());
std::string channelID = flds[7];
tChannelID chanID = tChannelID::FromString(channelID.c_str());
-
+ const cChannels* channels;
#if defined (APIVERSNUM) && (APIVERSNUM >= 20301)
+ {
LOCK_CHANNELS_READ;
- const cChannels* channels = Channels;
+ channels = Channels;
+ }
#else
- cChannels* channels = &Channels;
+ channels = &Channels;
#endif
const cChannel *channel = channels->GetByChannelID(chanID);
@@ -518,11 +520,14 @@ void cRecManager::DeleteSearchTimer(cTVGuideSearchTimer *searchTimer, bool delTi
return;
int searchTimerID = searchTimer->GetID();
if (delTimers) {
+ cTimers* timers;
#if defined (APIVERSNUM) && (APIVERSNUM >= 20301)
+ {
LOCK_TIMERS_WRITE;
- cTimers* timers = Timers;
+ timers = Timers;
+ }
#else
- cTimers* timers = &Timers;
+ timers = &Timers;
#endif
cTimer *timer = timers->First();
while (timer) {