Thread View: news.software.nntp
2 messages
2 total messages
Started by John F. Morse
Mon, 08 Mar 2010 16:22
Uninitialized value in sprintf [INN 2.4.5]
Author: John F. Morse
Date: Mon, 08 Mar 2010 16:22
Date: Mon, 08 Mar 2010 16:22
61 lines
3240 bytes
3240 bytes
First-time error from pullnews on INN 2.4.5, which has been running for
about two weeks:
Use of uninitialized value in sprintf at /usr/lib/news/bin/pullnews line 540.
Group command failed: 000
1 #! /usr/bin/perl -w
2 #
3 # Author: James Brister <brister@vix.com> -- berkeley-unix --
4 # Start Date: Sat, 10 Oct 1998 21:40:11 +0200
5 # Project: INN
6 # File: pullnews.pl
7 # RCSId: $Id: pullnews.in 7862 2008-06-08 09:15:41Z iulius $
...
529 sub crossFeedGroup {
530 my ($fromServer,$toServer,$server,$group,$shash) = @_;
531 my ($date,$high) = @{$shash->{$group}};
532 my ($prevDate,$prevHigh) = @{$shash->{$group}};
533 my ($narticles,$first,$last,$name) = $fromServer->group($group);
534 my $count = 0;
535 my $code;
536 my $startTime = time;
537 my ($prevRefused, $prevRejected) = ($info{refused},
$info{rejected});
538
539 if (!defined($narticles)) { # Group command failed.
540 warn sprintf ("Group command failed: %s %s\n",
541 $fromServer->code(), $fromServer->message());
542 return undef;
543 }
Not a big deal, but thought I'd report it.
It runs twice an hour, 15 minutes offset from an INN 2.5.1 server, which
had no error reported by its pullnews.
However, the upstream NSP (Highwinds) may have been down momentarily,
then back up before the newer INN 2.5.1 server's cron polled it.
So, this undefined variable might be already fixed in the newer INN
2.5.1 version:
@@ -538,7 +552,7 @@
my ($prevRefused, $prevRejected) = ($info{refused}, $info{rejected});
if (!defined($narticles)) { # Group command failed.
- warn sprintf ("Group command failed: %s %s\n",
+ warn sprintf ("Group command failed for $group: %s %s\n",
$fromServer->code(), $fromServer->message());
return undef;
}
--
John
When a person has -- whether they knew it or not -- already rejected the Truth, by what means do they discern a lie?
Re: Uninitialized value in sprintf [INN 2.4.5]
Author: Julien ÉLIE
Date: Mon, 08 Mar 2010 19:41
Date: Mon, 08 Mar 2010 19:41
21 lines
2138 bytes
2138 bytes
Hi John,
> Use of uninitialized value in sprintf at /usr/lib/news/bin/pullnews line 540.
> Group command failed: 000
> 540 warn sprintf ("Group command failed: %s %s\n",
> 541 $fromServer->code(), $fromServer->message());
It looks as though $fromServer->message() is undefined.
Maybe the remote news server dropped the connection or provided no message
after the response code?
> So, this undefined variable might be already fixed in the newer INN 2.5.1 version
Not that I know of :-/
--
Julien ÉLIE
« Métro, boulot, bistrots, mégots, dodo, zéro. » (Pierre Béarn)
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads