summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitar Petrovski <dimeptr@gmail.com>2019-07-04 09:58:14 (GMT)
committerDimitar Petrovski <dimeptr@gmail.com>2019-07-04 09:58:14 (GMT)
commit32b4e669bf8bc6e3336073616c121f10b8518fe8 (patch)
tree9ed7a97976e673e41b98ee79ca68df1ffed4a5f6
parentc46be443988489780f993a47d23a42936b49d6c0 (diff)
downloadvdr-plugin-eepg-experimental.tar.gz
vdr-plugin-eepg-experimental.tar.bz2
applied patch from cheesemonster to fix multiple tuners deadlock #2586HEADmasterexperimental
-rw-r--r--eepg.c6
-rw-r--r--eit2.c11
-rw-r--r--util.c2
3 files changed, 13 insertions, 6 deletions
diff --git a/eepg.c b/eepg.c
index ebcd745..1b6c9f0 100644
--- a/eepg.c
+++ b/eepg.c
@@ -274,7 +274,7 @@ void cFilterEEPG::Trigger (void)
void cFilterEEPG::SetStatus (bool On)
{
- LogI(0, prep("setstatus %d\n"), On);
+ // LogI(0, prep("setstatus %d\n"), On);
if (!On) {
FreeSummaries ();
FreeTitles ();
@@ -2779,7 +2779,7 @@ void cFilterEEPG::AddFilter (u_short Pid, u_char Tid)
{
if (!Matches (Pid, Tid)) {
Add (Pid, Tid);
- esyslog (prep("Filter Pid:0x%x,Tid:0x%x added."), Pid, Tid);
+ //esyslog (prep("Filter Pid:0x%x,Tid:0x%x added."), Pid, Tid);
}
}
@@ -2787,7 +2787,7 @@ void cFilterEEPG::AddFilter (u_short Pid, u_char Tid, unsigned char Mask)
{
if (!Matches (Pid, Tid)) {
Add (Pid, Tid, Mask);
- esyslog (prep("Filter Pid:0x%x,Tid:0x%x,Mask:0x%x added."), Pid, Tid, Mask);
+ //esyslog (prep("Filter Pid:0x%x,Tid:0x%x,Mask:0x%x added."), Pid, Tid, Mask);
}
}
diff --git a/eit2.c b/eit2.c
index 5aeb60d..9ee190d 100644
--- a/eit2.c
+++ b/eit2.c
@@ -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"));
}
diff --git a/util.c b/util.c
index b41faf8..1109181 100644
--- a/util.c
+++ b/util.c
@@ -403,7 +403,7 @@ char *freesat_huffman_decode (const unsigned char *src, size_t size)
bit++;
}
} else {
- LogE (0, prep("Missing table %d entry: <%s>"), tableid + 1, uncompressed);
+ //LogE (0, prep("Missing table %d entry: <%s>"), tableid + 1, uncompressed);
// Entry missing in table.
return uncompressed;
}