From fde4ca50a0f8887aec1ab17ab2fb368a2dcc71bd Mon Sep 17 00:00:00 2001 From: Dimitar Petrovski Date: Mon, 20 Aug 2018 10:12:57 +0200 Subject: try to fix race conditions in 2.4. leave channel linking to VDR --- eepg.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'eepg.c') diff --git a/eepg.c b/eepg.c index b319a46..f8ebb30 100644 --- a/eepg.c +++ b/eepg.c @@ -2917,7 +2917,7 @@ void cFilterEEPG::ProccessContinuous(u_short Pid, u_char Tid, int Length, const { //0x39 Viasat, 0x0300 Dish Network EEPG, 0x0441 Bell ExpressVU EEPG LogD(4, prep("Pid: 0x%02x Tid: %d Length: %d"), Pid, Tid, Length); -#if APIVERSNUM >= 20300 +/*#if APIVERSNUM >= 20300 LOCK_CHANNELS_WRITE; LOCK_SCHEDULES_WRITE; // cStateKey SchedulesStateKey; @@ -2925,12 +2925,12 @@ void cFilterEEPG::ProccessContinuous(u_short Pid, u_char Tid, int Length, const #else cSchedulesLock SchedulesLock(true, 10); cSchedules *Schedules = (cSchedules*)(cSchedules::Schedules(SchedulesLock)); -#endif +#endif*/ //Look for other satelite positions only if Dish/Bell ExpressVU for the moment hardcoded pid check - if(Channels && Schedules) - SI::cEIT2 EIT(Channels, Schedules, Source(), Tid, Data, Format, Pid == EIT_PID); + //if(Channels && Schedules) + SI::cEIT2 EIT(/*Channels, Schedules,*/ Source(), Tid, Data, Format, Pid == EIT_PID); -#if APIVERSNUM < 20300 +#if APIVERSNUM < 20300 //TODO else//cEIT EIT (Schedules, Source (), Tid, Data); { // If we don't get a write lock, let's at least get a read lock, so -- cgit v1.2.3 From 27fbd9ec01e5fc69f83a0649a631223b655b3a7a Mon Sep 17 00:00:00 2001 From: Dimitar Petrovski Date: Tue, 21 Aug 2018 10:33:02 +0200 Subject: code clenaup --- eepg.c | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) (limited to 'eepg.c') diff --git a/eepg.c b/eepg.c index f8ebb30..ebcd745 100644 --- a/eepg.c +++ b/eepg.c @@ -2917,36 +2917,8 @@ void cFilterEEPG::ProccessContinuous(u_short Pid, u_char Tid, int Length, const { //0x39 Viasat, 0x0300 Dish Network EEPG, 0x0441 Bell ExpressVU EEPG LogD(4, prep("Pid: 0x%02x Tid: %d Length: %d"), Pid, Tid, Length); -/*#if APIVERSNUM >= 20300 - LOCK_CHANNELS_WRITE; - LOCK_SCHEDULES_WRITE; -// cStateKey SchedulesStateKey; -// cSchedules *Schedules = cSchedules::GetSchedulesWrite(SchedulesStateKey, 10); -#else - cSchedulesLock SchedulesLock(true, 10); - cSchedules *Schedules = (cSchedules*)(cSchedules::Schedules(SchedulesLock)); -#endif*/ //Look for other satelite positions only if Dish/Bell ExpressVU for the moment hardcoded pid check - //if(Channels && Schedules) - SI::cEIT2 EIT(/*Channels, Schedules,*/ Source(), Tid, Data, Format, Pid == EIT_PID); - -#if APIVERSNUM < 20300 //TODO - else//cEIT EIT (Schedules, Source (), Tid, Data); - { - // If we don't get a write lock, let's at least get a read lock, so - // that we can set the running status and 'seen' timestamp (well, actually - // with a read lock we shouldn't be doing that, but it's only integers that - // get changed, so it should be ok) - cChannelsLock ChannelsLock; - cChannels *Channels = (cSchedules*)(cSchedules::Schedules(SchedulesLock)); - cSchedulesLock SchedulesLock; - cSchedules *Schedules = (cSchedules*)(cSchedules::Schedules(SchedulesLock)); - if(Channels && Schedules) - SI::cEIT2 EIT(Channels, Schedules, Source(), Tid, Data, Format, Pid == EIT_PID, true); - - //cEIT EIT (Schedules, Source (), Tid, Data, true); - } -#endif + SI::cEIT2 EIT(Source(), Tid, Data, Format, Pid == EIT_PID); } void cFilterEEPG::Process (u_short Pid, u_char Tid, const u_char * Data, int Length) -- cgit v1.2.3