diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2004-08-08 14:12:43 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2004-08-08 14:12:43 +0200 |
commit | 30da608c70f2a7ff23bfdf49c158630ed57d0bf2 (patch) | |
tree | 94d4c98690580b1179cfc6ff4242ae69974be8a8 | |
parent | 4a72fd75c2c7ddff479dc4783036672db79512b1 (diff) | |
download | vdr-30da608c70f2a7ff23bfdf49c158630ed57d0bf2.tar.gz vdr-30da608c70f2a7ff23bfdf49c158630ed57d0bf2.tar.bz2 |
Making sure section filters are only set if the device actually has a lock
-rw-r--r-- | CONTRIBUTORS | 2 | ||||
-rw-r--r-- | HISTORY | 4 | ||||
-rw-r--r-- | config.h | 6 | ||||
-rw-r--r-- | sections.c | 24 | ||||
-rw-r--r-- | sections.h | 4 |
5 files changed, 26 insertions, 14 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS index f09cb259..a2109316 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -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' @@ -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). @@ -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 @@ -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,13 +146,18 @@ void cSectionHandler::SetStatus(bool On) { Lock(); if (on != On) { - statusCount++; - for (cFilter *fi = filters.First(); fi; fi = filters.Next(fi)) { - fi->SetStatus(false); - if (On) - fi->SetStatus(true); - } - on = On; + if (!On || device->HasLock()) { + statusCount++; + for (cFilter *fi = filters.First(); fi; fi = filters.Next(fi)) { + fi->SetStatus(false); + if (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)) { @@ -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; |