Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] Re: master-timer 0.5.1 bugfix/enhancement
> while trying to get master-timer 0.5.1 to work on my VDR machine, I
> discovered a bug when uselste is non-zero (this will read the EPG data
> through SVDRP instead of the epg.data file. The original version of
> master-timer 0.5.1 won't find any data because of a problem in the data
> parsing routine in processprogram.pl.
>
> I also noticed that it takes too long to fill up the array of response lines
> in svdr.pl which causes VDR's watchdog timer to restart before all EPG data
> has been read. I'm no Perl guru, but I think appending data to an array like
> this: (@retval) = (@retval, $_); is very inefficient. That's why I rewrote
> the while-loop.
>
> I wonder why nobody else noticed these problems before ... am I the only one
> using master-timer? Anyway, here is the patch ;-)
Maybe the other don't use LSTE. (Personally i can't use it (VDR 0.68
isn't capable of LSTE), and so couldn't test it. But for a "blind"
implementation it wasn't so bad <g>)
The actual change in mt is a bit different.
The change in "GetSend" is (as suggested) "push (@lines, $_);"
But the bug in processprogram is actually diffrent then you thought:
--- devel/master-timer-0.5.1/processprogram.pl Mon Mar 4 00:27:57 2002
+++ devel/mt-current/processprogram.pl Mon Mar 25 00:20:25 2002
@@ -508,21 +508,29 @@
my ($title, $subtitle, $description, $channel, $time, $duration, $category);
my ($country, $year, $director, $actor);
my (@lines, $line, $count, $ret);
+ my (@templines);
my ($rPEntry);
$ret = 0;
+ @lines = ();
if ($$rConfig{uselste}) {
initsocket($rVars);
foreach my $num (sort keys %{$rDest->{Dest}}) {
- @lines = (@lines,GetSend ($num, "LSTE"));
+ push (@templines, GetSend ($num, "LSTE"));
}
- foreach $line (@lines) {
- $line =~ s/^250[- ]//
+ foreach $line (@templines) {
+ if ($line =~ s/^250[- ]//) {
+ push @lines, $line;
+ }
}
} else {
open (FI,"epg.data") or die ("Can't open file \"epg.data\"\n");
@lines = <FI>;
Bis denn
--
Real Programmers consider "what you see is what you get" to be just as
bad a concept in Text Editors as it is in women. No, the Real Programmer
wants a "you asked for it, you got it" text editor -- complicated,
cryptic, powerful, unforgiving, dangerous.
Home |
Main Index |
Thread Index