From 8c21f7d47998ffc1c2c6568226eb693b0a918c7a Mon Sep 17 00:00:00 2001 From: Jasmin Jessich Date: Thu, 18 May 2017 23:09:38 +0200 Subject: Fixed lock order in SearchResult::GetEvent - SearchResult::GetEvent has now a new parameter Channel - Call EpgEvents::CreateEpgInfo only, if a Channel has been found. --- epgsearch.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'epgsearch.h') diff --git a/epgsearch.h b/epgsearch.h index 61ae2eb..95d7387 100644 --- a/epgsearch.h +++ b/epgsearch.h @@ -340,12 +340,12 @@ public: time_t TimerStopTime() const { return m_timerstop; } int TimerMode() const { return m_timerMode; } bool operator<( SearchResult const& other ) const { return m_starttime < other.m_starttime; } - const cEvent* GetEvent(); + const cEvent* GetEvent(const cChannel* Channel); - /* 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 + /* Be careful when calling this function concerning the lock order: + * Timers, Channels, Recordings Schedules + */ const cChannel* GetChannel() { LOCK_CHANNELS_READ; return Channels->GetByChannelID(m_channel); } #else const cChannel* GetChannel() { return Channels.GetByChannelID(m_channel); } -- cgit v1.2.3