diff options
author | kamel5 <kamel5 (at) gmx (dot) net> | 2018-03-31 15:21:32 +0200 |
---|---|---|
committer | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2019-01-27 11:34:22 +0100 |
commit | c6d01ba60b75d9bb297b646895e14e9df1835807 (patch) | |
tree | e83ed1c32308437b9372646b8417c5c4c6ccde34 /recmanager.c | |
parent | d5b3844dcc6b79b4ed5d15087bc06ce0fba442b2 (diff) | |
download | vdr-plugin-tvguide-c6d01ba60b75d9bb297b646895e14e9df1835807.tar.gz vdr-plugin-tvguide-c6d01ba60b75d9bb297b646895e14e9df1835807.tar.bz2 |
Eliminate deadlock in "DeleteTimer"
Diffstat (limited to 'recmanager.c')
-rw-r--r-- | recmanager.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/recmanager.c b/recmanager.c index f2abc71..cda65ba 100644 --- a/recmanager.c +++ b/recmanager.c @@ -178,9 +178,13 @@ void cRecManager::SetTimerPath(cTimer *timer, const cEvent *event, std::string p } void cRecManager::DeleteTimer(int timerID) { + dsyslog ("%s %s %d\n", __FILE__, __func__, __LINE__); #if VDRVERSNUM >= 20301 + const cTimer *t; + { LOCK_TIMERS_READ; - const cTimer *t = Timers->Get(timerID); + t = Timers->Get(timerID); + } #else cTimer *t = Timers.Get(timerID); #endif @@ -190,6 +194,7 @@ void cRecManager::DeleteTimer(int timerID) { } void cRecManager::DeleteTimer(const cEvent *event) { + dsyslog ("%s %s %d\n", __FILE__, __func__, __LINE__); if (!event) return; if (tvguideConfig.useRemoteTimers && pRemoteTimers) { @@ -200,9 +205,13 @@ void cRecManager::DeleteTimer(const cEvent *event) { } void cRecManager::DeleteLocalTimer(const cEvent *event) { + dsyslog ("%s %s %d\n", __FILE__, __func__, __LINE__); #if VDRVERSNUM >= 20301 + const cTimer *t; + { LOCK_TIMERS_READ; - const cTimer *t = Timers->GetMatch(event); + t = Timers->GetMatch(event); + } #else cTimer *t = Timers.GetMatch(event); #endif @@ -214,6 +223,7 @@ void cRecManager::DeleteLocalTimer(const cEvent *event) { #if VDRVERSNUM >= 20301 void cRecManager::DeleteTimer(const cTimer *timer) { + dsyslog ("%s %s %d\n", __FILE__, __func__, __LINE__); LOCK_TIMERS_WRITE; cTimers* timers = Timers; cTimer* t = timers->GetTimer((cTimer*)timer); // #TODO dirty cast |