summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2003-03-16 11:17:46 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2003-03-16 11:17:46 +0100
commit5261fd663f87f8649fe265122b2b8c4513e53f27 (patch)
tree7123748c63a5508c61c83afa55715253d7f51812
parent8d4d7f2b626226a543e09651772d43e7313ebbf5 (diff)
downloadvdr-5261fd663f87f8649fe265122b2b8c4513e53f27.tar.gz
vdr-5261fd663f87f8649fe265122b2b8c4513e53f27.tar.bz2
Fixed a possible deadlock when using the 'Blue' button in the 'Schedules' menu to switch to an other channel
-rw-r--r--CONTRIBUTORS4
-rw-r--r--HISTORY4
-rw-r--r--eit.c9
3 files changed, 10 insertions, 7 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index fe70f1af..0152c5ff 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -544,3 +544,7 @@ Jan Ekholm <chakie@infa.abo.fi>
Marcel Wiesweg <marcel.wiesweg@gmx.de>
for pointing out a problem with high CPU load during replay
for reporting broken support for raw OSDs of plugins
+
+Torsten Herz <torsten.herz@web.de>
+ for fixing a possible deadlock when using the "Blue" button in the "Schedules" menu
+ to switch to an other channel
diff --git a/HISTORY b/HISTORY
index f345f65f..26358c42 100644
--- a/HISTORY
+++ b/HISTORY
@@ -1971,7 +1971,7 @@ Video Disk Recorder Revision History
reporting this one).
- Broken CAM connections are now restored automatically.
-2003-03-09: Version 1.1.26
+2003-03-16: Version 1.1.26
- Removed signal handling and usleep(5000) from cDvbOsd::Cmd() (apparently this
is no longer necessary with DVB driver 1.0.0pre2 or later).
@@ -1980,3 +1980,5 @@ Video Disk Recorder Revision History
startup and uses the first one (if any) that actually has an MPEG decoder.
That way this will also work automatically if the primary device is implemented
by a plugin.
+- Fixed a possible deadlock when using the "Blue" button in the "Schedules" menu
+ to switch to an other channel (thanks to Torsten Herz).
diff --git a/eit.c b/eit.c
index eebe82c7..99d1e21d 100644
--- a/eit.c
+++ b/eit.c
@@ -16,7 +16,7 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
- * $Id: eit.c 1.65 2003/02/02 15:41:03 kls Exp $
+ * $Id: eit.c 1.66 2003/03/16 11:14:35 kls Exp $
***************************************************************************/
#include "eit.h"
@@ -1250,12 +1250,13 @@ void cSIProcessor::Action()
if (seclen == r)
{
//dsyslog("Received pid 0x%04X with table ID 0x%02X and length of %4d\n", pid, buf[0], seclen);
+ cMutexLock MutexLock(&schedulesMutex); // since the xMem... stuff is not thread safe, we need to use a "global" mutex
+ LOCK_THREAD;
switch (pid)
{
case 0x00:
if (buf[0] == 0x00)
{
- LOCK_THREAD;
if (pmtPid && time(NULL) - lastPmtScan > PMT_SCAN_TIMEOUT) {
DelFilter(pmtPid, 0x02);
pmtPid = 0;
@@ -1263,7 +1264,6 @@ void cSIProcessor::Action()
lastPmtScan = time(NULL);
}
if (!pmtPid) {
- cMutexLock MutexLock(&schedulesMutex); // since the xMem... stuff is not thread safe, we need to use a "global" mutex
struct LIST *pat = siParsePAT(buf);
if (pat) {
int Index = 0;
@@ -1301,7 +1301,6 @@ void cSIProcessor::Action()
case 0x12:
if (buf[0] != 0x72)
{
- cMutexLock MutexLock(&schedulesMutex);
cEIT ceit(buf, seclen, schedules);
ceit.ProcessEIT(buf, currentSource);
}
@@ -1310,9 +1309,7 @@ void cSIProcessor::Action()
break;
default: {
- LOCK_THREAD;
if (pid == pmtPid && buf[0] == 0x02 && currentSource && currentTransponder) {
- cMutexLock MutexLock(&schedulesMutex); // since the xMem... stuff is not thread safe, we need to use a "global" mutex
struct Pid *pi = siParsePMT(buf);
if (pi) {
for (struct LIST *d = (struct LIST *)pi->Descriptors; d; d = (struct LIST *)xSucc(d)) {