diff options
author | Dimitar Petrovski <dimeptr@gmail.com> | 2019-07-04 11:58:14 +0200 |
---|---|---|
committer | Dimitar Petrovski <dimeptr@gmail.com> | 2019-07-04 11:58:14 +0200 |
commit | 32b4e669bf8bc6e3336073616c121f10b8518fe8 (patch) | |
tree | 9ed7a97976e673e41b98ee79ca68df1ffed4a5f6 /eit2.c | |
parent | c46be443988489780f993a47d23a42936b49d6c0 (diff) | |
download | vdr-plugin-eepg-master.tar.gz vdr-plugin-eepg-master.tar.bz2 |
applied patch from cheesemonster to fix multiple tuners deadlock #2586HEADmasterexperimental
Diffstat (limited to 'eit2.c')
-rw-r--r-- | eit2.c | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -491,13 +491,16 @@ cEIT2::cEIT2 (int Source, u_char Tid, const u_char * Data, EFormat format, bool //LogD(5, prep("channelID: %s format:%d"), *channel->GetChannelID().ToString(), Format); #if APIVERSNUM >= 20300 - LOCK_CHANNELS_WRITE; + cStateKey ChannelsStateKey; + cChannels *Channels = cChannels::GetChannelsWrite(ChannelsStateKey, 10); if (!Channels) { LogD(3, prep("Error obtaining channels lock")); return; } - LOCK_SCHEDULES_WRITE; + cStateKey SchedulesStateKey; + cSchedules *Schedules = cSchedules::GetSchedulesWrite(SchedulesStateKey, 10); if (!Schedules) { + ChannelsStateKey.Remove(false); LogD(3, prep("Error obtaining schedules lock")); return; } @@ -622,6 +625,8 @@ cEIT2::cEIT2 (int Source, u_char Tid, const u_char * Data, EFormat format, bool if (Tid == 0x4E) pSchedule->SetPresentSeen (); if (OnlyRunningStatus) { + SchedulesStateKey.Remove(false); + ChannelsStateKey.Remove(false); LogD(4, prep("OnlyRunningStatus")); return; } @@ -630,6 +635,8 @@ cEIT2::cEIT2 (int Source, u_char Tid, const u_char * Data, EFormat format, bool pSchedule->DropOutdated (SegmentStart, SegmentEnd, Tid, getVersionNumber ()); sortSchedules(Schedules, channel->GetChannelID()); } + SchedulesStateKey.Remove(Modified); + ChannelsStateKey.Remove(Modified); LogD(4, prep("end of cEIT2")); } |