summaryrefslogtreecommitdiff
path: root/recmanager.c
diff options
context:
space:
mode:
authorkamel5 <vdr.kamel5 (at) gmx (dot) net>2019-03-28 13:10:31 +0100
committerkamel5 <vdr.kamel5 (at) gmx (dot) net>2019-04-01 17:00:16 +0200
commit060089548a2cb6d3e19e9a162b1fe09776de3883 (patch)
treedc39f8994ed2c13ae17225476134d0f22404fafc /recmanager.c
parent56014ea73631115c50c2cad61315e330480d7c36 (diff)
downloadvdr-plugin-tvguide-060089548a2cb6d3e19e9a162b1fe09776de3883.tar.gz
vdr-plugin-tvguide-060089548a2cb6d3e19e9a162b1fe09776de3883.tar.bz2
Fixed a "invalid lock sequence report" in "cRecManager::PerformSearchTimerSearch"
Diffstat (limited to 'recmanager.c')
-rw-r--r--recmanager.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/recmanager.c b/recmanager.c
index eca9c65..c09d25a 100644
--- a/recmanager.c
+++ b/recmanager.c
@@ -409,12 +409,14 @@ const cEvent **cRecManager::PerformSearchTimerSearch(std::string epgSearchString
numResults = results.size();
if (numResults > 0) {
searchResults = new const cEvent *[numResults];
+ const cSchedules *schedules;
#if VDRVERSNUM >= 20301
+ {
LOCK_SCHEDULES_READ;
- const cSchedules* schedules = Schedules;
+ schedules = Schedules;
+ }
#else
cSchedulesLock schedulesLock;
- const cSchedules *schedules;
schedules = cSchedules::Schedules(schedulesLock);
#endif
const cEvent *event = NULL;
@@ -426,11 +428,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 cChannel *channel;
#if VDRVERSNUM >= 20301
+ {
LOCK_CHANNELS_READ;
- const cChannel *channel = Channels->GetByChannelID(chanID);
+ channel = Channels->GetByChannelID(chanID);
+ }
#else
- cChannel *channel = Channels.GetByChannelID(chanID);
+ channel = Channels.GetByChannelID(chanID);
#endif
if (channel) {
const cSchedule *Schedule = NULL;