Bug in ProvidesTransponder() makes EPG Scan impossible???

Message ID 4285CC6C.4030108@cadsoft.de
State New
Headers

Commit Message

Klaus Schmidinger May 14, 2005, 10:01 a.m. UTC
  Michael Reinelt wrote:
> Hi there,
> 
> I debugged a bit my "EPG Scan not working" problem, and maybe I found a bug:
> 
> in eitscan.c around line 160 theres something like
> if (Device->ProvidesTransponder(Channel))
> 
> I found out that this method always returns 0 here, therefore preventing
> the EPG Scan to start.
> 
> ProvidesTRransponder() is defined in dvbdevice.c line 776, and it reads:
> 
> bool cDvbDevice::ProvidesTransponder(const cChannel *Channel) const
> {
>   return ProvidesSource(Channel->Source())
>   && ((Channel->Source() & cSource::st_Mask) != cSource::stSat
>   ||  Diseqcs.Get(Channel->Source(),
> Channel->Frequency(),Channel->Polarization()));
> }
> 
> ProvidesSource() returns 1 here, but the second expression is always
> zero, both sides of the ||
> 
> the first one I do understand: I'm on Sat only. The second one is clear
> to me, too: I'm not using diseq at all. So this returns 0, too.
> 
> But I have no idea how this sould be fixed.
> 
> Any ideas?

Please try this:




This adds a check for Setup.DiSEqC, which is also done in cDvbTuner::SetFrontend() and
therefore is apparently missing here.

Klaus
  

Comments

Darren Salt May 14, 2005, 1 p.m. UTC | #1
I demand that Klaus Schmidinger may or may not have written...

> Michael Reinelt wrote:
>> I debugged a bit my "EPG Scan not working" problem, and maybe I found a
>> bug:
[snip description]

> Please try this:

> --- dvbdevice.c 2005/03/20 10:10:38     1.127
> +++ dvbdevice.c 2005/05/14 09:59:17
> @@ -741,7 +741,7 @@
[snip mangled patch]

Those of you who use Mozilla Thunderbird: if you include patches, include
them as attachments. If you inline them, it mangles them in at _least_ the
following ways:

  * trailing spaces are stripped (for format=flowed)
  * lines may be hard-wrapped
  * lines which start with spaces have an extra space prepended
  
Michael Reinelt May 15, 2005, 9:31 a.m. UTC | #2
Hi Klaus,

> This adds a check for Setup.DiSEqC, which is also done in
> cDvbTuner::SetFrontend() and
> therefore is apparently missing here.

Works fine! Thanks!

bye, Michael
  

Patch

--- dvbdevice.c 2005/03/20 10:10:38     1.127
+++ dvbdevice.c 2005/05/14 09:59:17
@@ -741,7 +741,7 @@ 

  bool cDvbDevice::ProvidesTransponder(const cChannel *Channel) const
  {
-  return ProvidesSource(Channel->Source()) && ((Channel->Source() & cSource::st_Mask) != cSource::stSat || Diseqcs.Get(Channel->Source(), Channel->Frequency(), Channel->Polarization()));
+  return ProvidesSource(Channel->Source()) && ((Channel->Source() & cSource::st_Mask) != cSource::stSat || !Setup.DiSEqC || Diseqcs.Get(Channel->Source(), Channel->Frequency(), Channel->Polarization()));
  }

  bool cDvbDevice::ProvidesChannel(const cChannel *Channel, int Priority, bool *NeedsDetachReceivers) const