mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Fixed a deadlock when switching channels via Schedule/Now|Next/Switch
This commit is contained in:
parent
90af5a1bd9
commit
9f5397b510
@ -39,6 +39,7 @@ Martin Hammerschmid <martin@hammerschmid.com>
|
|||||||
for suggesting to display the direct channel select input on the OSD
|
for suggesting to display the direct channel select input on the OSD
|
||||||
for suggesting to use the "Blue" button in the main menu to resume replay
|
for suggesting to use the "Blue" button in the main menu to resume replay
|
||||||
for implementing pege up/down with the "Left" and "Right" keys
|
for implementing pege up/down with the "Left" and "Right" keys
|
||||||
|
for detecting a deadlock when switching channels via Schedule/Now|Next/Switch
|
||||||
|
|
||||||
Bastian Guse <bastian@nocopy.de>
|
Bastian Guse <bastian@nocopy.de>
|
||||||
for writing the FORMATS entry for timers.conf
|
for writing the FORMATS entry for timers.conf
|
||||||
|
6
HISTORY
6
HISTORY
@ -1047,3 +1047,9 @@ Video Disk Recorder Revision History
|
|||||||
|
|
||||||
- Fixed a crash in case there is no 'epg.data' at program start (thanks to
|
- Fixed a crash in case there is no 'epg.data' at program start (thanks to
|
||||||
Andreas Schultz).
|
Andreas Schultz).
|
||||||
|
|
||||||
|
2002-03-01: Version 1.0.0pre3
|
||||||
|
|
||||||
|
- Fixed parsing 'E' records in epg2html.pl.
|
||||||
|
- Fixed a deadlock when switching channels via Schedule/Now|Next/Switch (reported
|
||||||
|
by Martin Hammerschmid).
|
||||||
|
4
config.h
4
config.h
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: config.h 1.100 2002/02/25 16:29:09 kls Exp $
|
* $Id: config.h 1.101 2002/02/26 17:25:30 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __CONFIG_H
|
#ifndef __CONFIG_H
|
||||||
@ -19,7 +19,7 @@
|
|||||||
#include "eit.h"
|
#include "eit.h"
|
||||||
#include "tools.h"
|
#include "tools.h"
|
||||||
|
|
||||||
#define VDRVERSION "1.0.0pre2"
|
#define VDRVERSION "1.0.0pre3"
|
||||||
|
|
||||||
#define MAXPRIORITY 99
|
#define MAXPRIORITY 99
|
||||||
#define MAXLIFETIME 99
|
#define MAXLIFETIME 99
|
||||||
|
5
dvbapi.c
5
dvbapi.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: dvbapi.c 1.152 2002/02/24 12:53:51 kls Exp $
|
* $Id: dvbapi.c 1.153 2002/03/02 09:37:56 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "dvbapi.h"
|
#include "dvbapi.h"
|
||||||
@ -2238,9 +2238,6 @@ bool cDvbApi::SetPids(bool ForRecording)
|
|||||||
|
|
||||||
eSetChannelResult cDvbApi::SetChannel(int ChannelNumber, int Frequency, char Polarization, int Diseqc, int Srate, int Vpid, int Apid1, int Apid2, int Dpid1, int Dpid2, int Tpid, int Ca, int Pnr)
|
eSetChannelResult cDvbApi::SetChannel(int ChannelNumber, int Frequency, char Polarization, int Diseqc, int Srate, int Vpid, int Apid1, int Apid2, int Dpid1, int Dpid2, int Tpid, int Ca, int Pnr)
|
||||||
{
|
{
|
||||||
// Make sure the siProcessor won't access the device while switching
|
|
||||||
cThreadLock ThreadLock(siProcessor);
|
|
||||||
|
|
||||||
StopTransfer();
|
StopTransfer();
|
||||||
StopReplay();
|
StopReplay();
|
||||||
|
|
||||||
|
22
eit.c
22
eit.c
@ -16,7 +16,7 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or *
|
* the Free Software Foundation; either version 2 of the License, or *
|
||||||
* (at your option) any later version. *
|
* (at your option) any later version. *
|
||||||
* *
|
* *
|
||||||
* $Id: eit.c 1.38 2002/02/25 16:30:42 kls Exp $
|
* $Id: eit.c 1.39 2002/03/01 16:32:11 kls Exp $
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
#include "eit.h"
|
#include "eit.h"
|
||||||
@ -1047,8 +1047,6 @@ const char *cSIProcessor::GetEpgDataFileName(void)
|
|||||||
|
|
||||||
void cSIProcessor::SetStatus(bool On)
|
void cSIProcessor::SetStatus(bool On)
|
||||||
{
|
{
|
||||||
LOCK_THREAD;
|
|
||||||
schedulesMutex.Lock();
|
|
||||||
ShutDownFilters();
|
ShutDownFilters();
|
||||||
if (On)
|
if (On)
|
||||||
{
|
{
|
||||||
@ -1061,7 +1059,6 @@ void cSIProcessor::SetStatus(bool On)
|
|||||||
AddFilter(0x12, 0x51); // event info, actual TS, schedule for another 4 days
|
AddFilter(0x12, 0x51); // event info, actual TS, schedule for another 4 days
|
||||||
AddFilter(0x12, 0x61); // event info, other TS, schedule for another 4 days
|
AddFilter(0x12, 0x61); // event info, other TS, schedule for another 4 days
|
||||||
}
|
}
|
||||||
schedulesMutex.Unlock();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** use the vbi device to parse all relevant SI
|
/** use the vbi device to parse all relevant SI
|
||||||
@ -1085,20 +1082,15 @@ void cSIProcessor::Action()
|
|||||||
struct tm *ptm = localtime_r(&now, &tm_r);
|
struct tm *ptm = localtime_r(&now, &tm_r);
|
||||||
if (now - lastCleanup > 3600 && ptm->tm_hour == 5)
|
if (now - lastCleanup > 3600 && ptm->tm_hour == 5)
|
||||||
{
|
{
|
||||||
LOCK_THREAD;
|
cMutexLock MutexLock(&schedulesMutex);
|
||||||
|
|
||||||
schedulesMutex.Lock();
|
|
||||||
isyslog(LOG_INFO, "cleaning up schedules data");
|
isyslog(LOG_INFO, "cleaning up schedules data");
|
||||||
schedules->Cleanup();
|
schedules->Cleanup();
|
||||||
schedulesMutex.Unlock();
|
|
||||||
lastCleanup = now;
|
lastCleanup = now;
|
||||||
ReportEpgBugFixStats(true);
|
ReportEpgBugFixStats(true);
|
||||||
}
|
}
|
||||||
if (epgDataFileName && now - lastDump > 600)
|
if (epgDataFileName && now - lastDump > 600)
|
||||||
{
|
{
|
||||||
LOCK_THREAD;
|
cMutexLock MutexLock(&schedulesMutex);
|
||||||
|
|
||||||
schedulesMutex.Lock();
|
|
||||||
FILE *f = fopen(GetEpgDataFileName(), "w");
|
FILE *f = fopen(GetEpgDataFileName(), "w");
|
||||||
if (f) {
|
if (f) {
|
||||||
schedules->Dump(f);
|
schedules->Dump(f);
|
||||||
@ -1107,7 +1099,6 @@ void cSIProcessor::Action()
|
|||||||
else
|
else
|
||||||
LOG_ERROR;
|
LOG_ERROR;
|
||||||
lastDump = now;
|
lastDump = now;
|
||||||
schedulesMutex.Unlock();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1162,12 +1153,9 @@ void cSIProcessor::Action()
|
|||||||
case 0x12:
|
case 0x12:
|
||||||
if (buf[0] != 0x72)
|
if (buf[0] != 0x72)
|
||||||
{
|
{
|
||||||
LOCK_THREAD;
|
cMutexLock MutexLock(&schedulesMutex);
|
||||||
|
|
||||||
schedulesMutex.Lock();
|
|
||||||
cEIT ceit(buf, seclen, schedules);
|
cEIT ceit(buf, seclen, schedules);
|
||||||
ceit.ProcessEIT(buf);
|
ceit.ProcessEIT(buf);
|
||||||
schedulesMutex.Unlock();
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
dsyslog(LOG_INFO, "Received stuffing section in EIT\n");
|
dsyslog(LOG_INFO, "Received stuffing section in EIT\n");
|
||||||
@ -1261,6 +1249,6 @@ bool cSIProcessor::ShutDownFilters(void)
|
|||||||
/** */
|
/** */
|
||||||
bool cSIProcessor::SetCurrentServiceID(unsigned short servid)
|
bool cSIProcessor::SetCurrentServiceID(unsigned short servid)
|
||||||
{
|
{
|
||||||
LOCK_THREAD;
|
cMutexLock MutexLock(&schedulesMutex);
|
||||||
return schedules ? schedules->SetCurrentServiceID(servid) : false;
|
return schedules ? schedules->SetCurrentServiceID(servid) : false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user