1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Fixed a lockup in the EPG scanner when no non-primary device was available

This commit is contained in:
Klaus Schmidinger 2004-01-05 09:56:54 +01:00
parent a80709f1dd
commit 113957107e
4 changed files with 21 additions and 15 deletions

View File

@ -887,3 +887,6 @@ Pedro Miguel Sequeira de Justo Teixeira <pedro.miguel.teixeira@bigfoot.com>
Antonino Sergi <voyaser@tiscalinet.it> Antonino Sergi <voyaser@tiscalinet.it>
for adding 'StreamType' setting to CAM communication for adding 'StreamType' setting to CAM communication
Martin Holst <holstm@gmx.de>
for reporting a lockup in 1.3.0 when the EPG scanner kicks in

View File

@ -2537,3 +2537,8 @@ Video Disk Recorder Revision History
- Limited the line length in the EPG bugfix report, which appears to fix a buffer - Limited the line length in the EPG bugfix report, which appears to fix a buffer
overflow that caused a crash when cleaning up the EPG data (at 05:00 in the overflow that caused a crash when cleaning up the EPG data (at 05:00 in the
morning). morning).
2004-01-05: Version 1.3.1
- Fixed a lockup in the EPG scanner when no non-primary device was available
(thanks to Martin Holst for reporting this one).

View File

@ -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.178 2003/12/27 13:57:56 kls Exp $ * $Id: config.h 1.179 2004/01/05 09:56:54 kls Exp $
*/ */
#ifndef __CONFIG_H #ifndef __CONFIG_H
@ -19,8 +19,8 @@
#include "device.h" #include "device.h"
#include "tools.h" #include "tools.h"
#define VDRVERSION "1.3.0" #define VDRVERSION "1.3.1"
#define VDRVERSNUM 10300 // Version * 10000 + Major * 100 + Minor #define VDRVERSNUM 10301 // Version * 10000 + Major * 100 + Minor
#define MAXPRIORITY 99 #define MAXPRIORITY 99
#define MAXLIFETIME 99 #define MAXLIFETIME 99

View File

@ -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: eitscan.c 1.15 2004/01/04 12:28:00 kls Exp $ * $Id: eitscan.c 1.16 2004/01/05 09:51:25 kls Exp $
*/ */
#include "eitscan.h" #include "eitscan.h"
@ -110,13 +110,11 @@ void cEITScanner::Process(void)
for (bool AnyDeviceSwitched = false; !AnyDeviceSwitched; ) { for (bool AnyDeviceSwitched = false; !AnyDeviceSwitched; ) {
cScanData *ScanData = NULL; cScanData *ScanData = NULL;
for (int i = 0; i < cDevice::NumDevices(); i++) { for (int i = 0; i < cDevice::NumDevices(); i++) {
cDevice *Device = cDevice::GetDevice(i); if (ScanData || (ScanData = scanList->First()) != NULL) {
if (Device) { cDevice *Device = cDevice::GetDevice(i);
if (Device != cDevice::PrimaryDevice() || (cDevice::NumDevices() == 1 && Setup.EPGScanTimeout && now - lastActivity > Setup.EPGScanTimeout * 3600)) { if (Device) {
if (!(Device->Receiving(true) || Device->Replaying())) { if (Device != cDevice::PrimaryDevice() || (cDevice::NumDevices() == 1 && Setup.EPGScanTimeout && now - lastActivity > Setup.EPGScanTimeout * 3600)) {
if (!ScanData) if (!(Device->Receiving(true) || Device->Replaying())) {
ScanData = scanList->First();
if (ScanData) {
cChannel *Channel = ScanData->GetChannel(); cChannel *Channel = ScanData->GetChannel();
//XXX if (Device->ProvidesTransponder(Channel)) { //XXX if (Device->ProvidesTransponder(Channel)) {
if ((!Channel->Ca() || Channel->Ca() == Device->DeviceNumber() + 1 || Channel->Ca() >= 0x0100) && Device->ProvidesTransponder(Channel)) { //XXX temporary for the 'sky' plugin if ((!Channel->Ca() || Channel->Ca() == Device->DeviceNumber() + 1 || Channel->Ca() >= 0x0100) && Device->ProvidesTransponder(Channel)) { //XXX temporary for the 'sky' plugin
@ -130,11 +128,11 @@ void cEITScanner::Process(void)
AnyDeviceSwitched = true; AnyDeviceSwitched = true;
} }
} }
else
break;
} }
} }
} }
else
break;
} }
if (ScanData && !AnyDeviceSwitched) { if (ScanData && !AnyDeviceSwitched) {
scanList->Del(ScanData); scanList->Del(ScanData);
@ -146,9 +144,9 @@ void cEITScanner::Process(void)
break; break;
} }
} }
Channels.Unlock();
lastScan = time(NULL);
} }
lastScan = time(NULL);
Channels.Unlock();
} }
} }
} }