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

Making sure section filters are only set if the device actually has a lock

This commit is contained in:
Klaus Schmidinger 2004-08-08 14:12:43 +02:00
parent 4a72fd75c2
commit 30da608c70
5 changed files with 26 additions and 14 deletions

View File

@ -271,6 +271,8 @@ Matthias Weingart <matthias@pentax.boerde.de>
Andreas Share <a.share@t-online.de>
for his support in keeping the Premiere World channels up to date in 'channels.conf'
for pointing out that section filters should only be set if the device actually has
a lock
Simon Bauschulte <SemiSchwabe@Brutzel.de>
for his support in keeping the Premiere World channels up to date in 'channels.conf'

View File

@ -2967,6 +2967,8 @@ Video Disk Recorder Revision History
- The 'radio' channel icon is now only displayed in the ST:TNG skin if the channel
actually has an APID.
2004-07-27: Version 1.3.13
2004-08-08: Version 1.3.13
- Fixed checking for the presence of NPTL (thanks to Jouni Karvo).
- Making sure section filters are only set if the device actually has a lock
(thanks to Andreas Share for pointing this out).

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: config.h 1.199 2004/07/17 11:09:42 kls Exp $
* $Id: config.h 1.200 2004/08/08 13:44:17 kls Exp $
*/
#ifndef __CONFIG_H
@ -20,8 +20,8 @@
#include "i18n.h"
#include "tools.h"
#define VDRVERSION "1.3.12"
#define VDRVERSNUM 10312 // Version * 10000 + Major * 100 + Minor
#define VDRVERSION "1.3.13"
#define VDRVERSNUM 10313 // Version * 10000 + Major * 100 + Minor
#define MAXPRIORITY 99
#define MAXLIFETIME 99

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: sections.c 1.7 2004/07/17 14:26:32 kls Exp $
* $Id: sections.c 1.8 2004/08/08 13:59:08 kls Exp $
*/
#include "sections.h"
@ -46,6 +46,7 @@ cSectionHandler::cSectionHandler(cDevice *Device)
active = false;
statusCount = 0;
on = false;
waitForLock = false;
lastIncompleteSection = 0;
Start();
}
@ -145,6 +146,7 @@ void cSectionHandler::SetStatus(bool On)
{
Lock();
if (on != On) {
if (!On || device->HasLock()) {
statusCount++;
for (cFilter *fi = filters.First(); fi; fi = filters.Next(fi)) {
fi->SetStatus(false);
@ -152,6 +154,10 @@ void cSectionHandler::SetStatus(bool On)
fi->SetStatus(true);
}
on = On;
waitForLock = false;
}
else
waitForLock = On;
}
Unlock();
}
@ -162,6 +168,8 @@ void cSectionHandler::Action(void)
while (active) {
Lock();
if (waitForLock)
SetStatus(true);
int NumFilters = filterHandles.Count();
pollfd pfd[NumFilters];
for (cFilterHandle *fh = filterHandles.First(); fh; fh = filterHandles.Next(fh)) {

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: sections.h 1.3 2004/01/11 13:18:38 kls Exp $
* $Id: sections.h 1.4 2004/08/08 13:44:17 kls Exp $
*/
#ifndef __SECTIONS_H
@ -27,7 +27,7 @@ private:
cDevice *device;
bool active;
int statusCount;
bool on;
bool on, waitForLock;
time_t lastIncompleteSection;
cList<cFilter> filters;
cList<cFilterHandle> filterHandles;