pullnews - bugfix, wishlist, new features

Julien ÉLIE julien at trigofacile.com
Sat Nov 15 15:01:35 UTC 2008


Hi Geraint,

> Two issues (and some minor tidy-ups) resolved with the attached patch to pullnews:

Thanks for your patch.
Just committed.


> - when an article number is not in group (423), pullnews redundantly retried that article

Speaking about codes, I see:


                } elsif ($reader and not $toServer->post($article)) {
                    #   240 article posted ok
                    #   340 send article to be posted.  End with <CR-LF>.<CR-LF>
                    #   440 posting not allowed
                    #   441 posting failed
                    my $code = $toServer->code();
                    my $msg = $toServer->message();
                    print LOG "\tDEBUGGING $i\tPost $code: Msg: <" . join('//', split(/\r?\n/, $msg)) . ">\n" if $debug >= 2;
                    $msg =~ s/^340 .*?\n(?=.)//o;
                    if ($msg =~ /^240 /) {
                        print LOG "+" unless $quiet;
                        push @warns, "Post $i ok ($code): $msg";
                        $fed{$group}++;
                        $info{server}->{$server}->{fed}++;
                        $info{fed}++;
                    } elsif ($msg =~ /^435 / or $msg =~ /duplicate message-id/io) {
                        print LOG "." unless $quiet;
                        push @warns, "Post $i to server declined ($code): $msg"
                                            if $msg !~ /^435 $msgid$/
                                            and $msg !~ /duplicate message-id/io;
                        $refused{$group}++;
                        $info{server}->{$server}->{refused}++;
                        $info{refused}++;
                    } else {
                        warn "Post $i to server failed ($code): $msg\n";
                        $toServer->quit();
                    }
                }


440 and 441 (in comments) are not used there.  But 435 (IHAVE answer) is.
Besides "if $msg !~ /^435 $msgid$/" will as often as not be true because there isn't
necessarily a message-ID after 435.

Is it the right behaviour for pullnews in that part of the code?

-- 
Julien ÉLIE

« Il ne faut jamais parler séchement à un Numide. » (Astérix) 




More information about the inn-workers mailing list