summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--epgsearch.cpp5
-rw-r--r--epgsearch.h4
-rw-r--r--pages/schedule.ecpp3
-rw-r--r--pages/timerconflicts.ecpp1
-rw-r--r--pages/timers.ecpp1
-rw-r--r--pages/whats_on.ecpp1
-rw-r--r--timers.cpp3
7 files changed, 17 insertions, 1 deletions
diff --git a/epgsearch.cpp b/epgsearch.cpp
index 7e92a10..0b15f10 100644
--- a/epgsearch.cpp
+++ b/epgsearch.cpp
@@ -578,10 +578,13 @@ SearchResult::SearchResult( string const& data )
const cEvent* SearchResult::GetEvent()
{
- cSchedulesLock schedulesLock;
+ /* JJJ: Lock order wrong, fix if function is still used
+ * Needs to be Timers, Channels, Recordings Schedules in this sequence
+ */
#if VDRVERSNUM >= 20301
LOCK_SCHEDULES_READ;
#else
+ cSchedulesLock schedulesLock;
const cSchedules* Schedules = cSchedules::Schedules(schedulesLock);
#endif
if (!Schedules) return NULL;
diff --git a/epgsearch.h b/epgsearch.h
index 7545b39..61ae2eb 100644
--- a/epgsearch.h
+++ b/epgsearch.h
@@ -341,6 +341,10 @@ public:
int TimerMode() const { return m_timerMode; }
bool operator<( SearchResult const& other ) const { return m_starttime < other.m_starttime; }
const cEvent* GetEvent();
+
+ /* JJJ: Should be done with a "Channels" argument to be sure the Lock order
+ * is correct; or find a better way to do this
+ */
#if VDRVERSNUM >= 20301
const cChannel* GetChannel() { LOCK_CHANNELS_READ; return Channels->GetByChannelID(m_channel); }
#else
diff --git a/pages/schedule.ecpp b/pages/schedule.ecpp
index be09d9d..96d9427 100644
--- a/pages/schedule.ecpp
+++ b/pages/schedule.ecpp
@@ -32,6 +32,9 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
pageTitle = trVDR("Schedule");
#if VDRVERSNUM >= 20301
+ /* JJJ: Order wrong! Better get first the channel and with unlocked
+ * channels lock read the schedules
+ */
LOCK_SCHEDULES_READ;
LOCK_CHANNELS_READ;
#else
diff --git a/pages/timerconflicts.ecpp b/pages/timerconflicts.ecpp
index 31f5607..b6c34f0 100644
--- a/pages/timerconflicts.ecpp
+++ b/pages/timerconflicts.ecpp
@@ -47,6 +47,7 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
<table class="listing" cellspacing="0" cellpadding="0">
<%cpp>
#if VDRVERSNUM >= 20301
+ /* JJJ: Lock this later when it is realy used */
LOCK_TIMERS_READ;
LOCK_SCHEDULES_READ;
#endif
diff --git a/pages/timers.ecpp b/pages/timers.ecpp
index cc2eeb6..9f5632c 100644
--- a/pages/timers.ecpp
+++ b/pages/timers.ecpp
@@ -78,6 +78,7 @@ static const size_t maximumDescriptionLength = 300;
<%cpp>
// output of the timer list:
#if VDRVERSNUM >= 20301
+ /* JJJ: Lock this inside the loop */
LOCK_SCHEDULES_READ;
#endif
for (SortedTimers::iterator timer = timers.begin(); timer != timers.end(); ++timer) {
diff --git a/pages/whats_on.ecpp b/pages/whats_on.ecpp
index a38faf9..2db13ef 100644
--- a/pages/whats_on.ecpp
+++ b/pages/whats_on.ecpp
@@ -39,6 +39,7 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
#if VDRVERSNUM >= 20301
+/* JJJ: Lock this later and in the right order */
LOCK_SCHEDULES_READ;
#else
cSchedulesLock schedulesLock;
diff --git a/timers.cpp b/timers.cpp
index 6991e91..01eb2be 100644
--- a/timers.cpp
+++ b/timers.cpp
@@ -328,6 +328,7 @@ namespace vdrlive {
*oldTimer = copy;
#if VDRVERSNUM >= 20301
+ // JJJ: Warum das?
Timers->SetModified();
#else
Timers.SetModified();
@@ -366,6 +367,7 @@ namespace vdrlive {
}
#if VDRVERSNUM >= 20301
Timers->Del( oldTimer );
+ // JJJ: Warum das?
Timers->SetModified();
#else
Timers.Del( oldTimer );
@@ -396,6 +398,7 @@ namespace vdrlive {
#if VDRVERSNUM >= 20301
toggleTimer->OnOff();
+ // JJJ: Warum das?
Timers->SetModified();
#else
toggleTimer->OnOff();