Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: Latest status of FE_HAS_LOCK problem?



Klaus Schmidinger wrote:
Yes, but which one?
There seem to be several patches...
Is it this one:

http://www.linuxtv.org/mailinglists/vdr/2004/07-2004/msg00383.html

Klaus, if I am gathering all this information correctly, the patch you mention above is one of the first working revisions for the FE_HAS_LOCK problem. But, sometime later, you posted your version of the patch and it appears to be working for everyone (please let me know if this is incorrect). So, I think we may just want to go with your version instead of the one mentioned in "http://www.linuxtv.org/mailinglists/vdr/2004/07-2004/msg00383.html";.

The only patch I am using is this one:

Klaus Schmidinger wrote:
> Please try this and let me know whether it works as well as the original
> suggestion.
>
> Klaus
>
>
>
> --- sections.h 2004/01/11 13:18:38 1.3
> +++ sections.h 2004/08/08 13:44:17
> @@ -27,7 +27,7 @@
> cDevice *device;
> bool active;
> int statusCount;
> - bool on;
> + bool on, waitForLock;
> time_t lastIncompleteSection;
> cList<cFilter> filters;
> cList<cFilterHandle> filterHandles;
> --- sections.c 2004/07/17 14:26:32 1.7
> +++ sections.c 2004/08/08 13:59:08
> @@ -46,6 +46,7 @@
> active = false;
> statusCount = 0;
> on = false;
> + waitForLock = false;
> lastIncompleteSection = 0;
> Start();
> }
> @@ -145,13 +146,18 @@
> {
> 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 @@
> while (active) {
>
> Lock();
> + if (waitForLock)
> + SetStatus(true);
> int NumFilters = filterHandles.Count();
> pollfd pfd[NumFilters];
> for (cFilterHandle *fh = filterHandles.First(); fh; fh =
> filterHandles.Next(fh)) {
>
>







Home | Main Index | Thread Index