summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoranbr <vdr07@deltab.de>2017-04-02 15:16:49 +0200
committeranbr <vdr07@deltab.de>2017-04-02 15:16:49 +0200
commit6a03b80df7f18ebb06f160fbe1d2ef3061c4b97a (patch)
tree7af8e952d7b465171a050cec752d11c33882e4dc
parente93074dcf50702dd42380c8b03d52e5f9261c867 (diff)
downloadvdr-plugin-imonlcd-6a03b80df7f18ebb06f160fbe1d2ef3061c4b97a.tar.gz
vdr-plugin-imonlcd-6a03b80df7f18ebb06f160fbe1d2ef3061c4b97a.tar.bz2
Fix: release every lock=Schedules (Closes: #2487)
-rw-r--r--watch.c60
1 files changed, 31 insertions, 29 deletions
diff --git a/watch.c b/watch.c
index 3ea9b60..7f3d6df 100644
--- a/watch.c
+++ b/watch.c
@@ -286,7 +286,7 @@ void ciMonWatch::Action(void)
if(!bSuspend) {
// every second the clock need updates.
if((0 == (nCnt % 5))) {
- if (theSetup.m_nRenderMode == eRenderMode_DualLine) {
+ if (theSetup.m_nRenderMode == eRenderMode_DualLine) {
bReDraw |= CurrentTime();
}
if(m_eWatchMode != eLiveTV) {
@@ -723,7 +723,7 @@ eReplayState ciMonWatch::ReplayMode() const
{
bool Play = false, Forward = false;
int Speed = -1;
- if (m_pControl
+ if (m_pControl
&& ((cControl *)m_pControl)->GetReplayMode(Play,Forward,Speed))
{
// 'Play' tells whether we are playing or pausing, 'Forward' tells whether
@@ -859,11 +859,11 @@ void ciMonWatch::Channel(int ChannelNumber)
const cChannel * ch = NULL;
#if APIVERSNUM >= 20302
- cStateKey lock;
- if (const cChannels *Channels = cChannels::GetChannelsRead(lock)) {
- ch = Channels->GetByNumber(ChannelNumber);
- lock.Remove();
- }
+ cStateKey lock;
+ if (const cChannels *Channels = cChannels::GetChannelsRead(lock)) {
+ ch = Channels->GetByNumber(ChannelNumber);
+ lock.Remove();
+ }
#else
ch = Channels.GetByNumber(ChannelNumber);
#endif
@@ -895,29 +895,31 @@ bool ciMonWatch::Program() {
cSchedulesLock lock;
const cSchedules * schedules = cSchedules::Schedules(lock);
#endif
- if (chID.Valid() && schedules) {
- const cSchedule * schedule = schedules->GetSchedule(chID);
- if (schedule && (p = schedule->GetPresentEvent()) != NULL) {
- if(!chPresentTime || chEventID != p->EventID()) {
- bChanged = true;
- chEventID = p->EventID();
- chPresentTime = p->StartTime();
- chFollowingTime = p->EndTime();
-
- if(chPresentTitle) {
- delete chPresentTitle;
- chPresentTitle = NULL;
- }
- if (!isempty(p->Title())) {
- chPresentTitle = new cString(p->Title());
- }
+ if (schedules) {
+ if (chID.Valid()) {
+ const cSchedule * schedule = schedules->GetSchedule(chID);
+ if (schedule && (p = schedule->GetPresentEvent()) != NULL) {
+ if(!chPresentTime || chEventID != p->EventID()) {
+ bChanged = true;
+ chEventID = p->EventID();
+ chPresentTime = p->StartTime();
+ chFollowingTime = p->EndTime();
+
+ if(chPresentTitle) {
+ delete chPresentTitle;
+ chPresentTitle = NULL;
+ }
+ if (!isempty(p->Title())) {
+ chPresentTitle = new cString(p->Title());
+ }
- if(chPresentShortTitle) {
- delete chPresentShortTitle;
- chPresentShortTitle = NULL;
- }
- if (!isempty(p->ShortText())) {
- chPresentShortTitle = new cString(p->ShortText());
+ if(chPresentShortTitle) {
+ delete chPresentShortTitle;
+ chPresentShortTitle = NULL;
+ }
+ if (!isempty(p->ShortText())) {
+ chPresentShortTitle = new cString(p->ShortText());
+ }
}
}
}