diff options
Diffstat (limited to 'recmanager.c')
-rw-r--r-- | recmanager.c | 15 |
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) { |