INN commit: branches/2.5/frontends (pullnews.in)

INN Commit rra at isc.org
Sun Jan 23 10:27:57 UTC 2011


    Date: Sunday, January 23, 2011 @ 02:27:57
  Author: iulius
Revision: 9165

The -F flag was not working when the -P flag was not also set
with pullnews.  The two flags can now be used separately.

Modified:
  branches/2.5/frontends/pullnews.in

-------------+
 pullnews.in |   24 ++++++++++++++----------
 1 file changed, 14 insertions(+), 10 deletions(-)

Modified: pullnews.in
===================================================================
--- pullnews.in	2011-01-23 10:27:08 UTC (rev 9164)
+++ pullnews.in	2011-01-23 10:27:57 UTC (rev 9165)
@@ -705,19 +705,23 @@
                 if ($article->[$idx] =~ m!^message-id:\s*(\S+)!i) {
                     $msgid = $1;
                 }
-                if (not $skip_due_to_hdrs and defined $pathSteps and $article->[$idx] =~ m!^Path:\s*!i) {
-                    my $path_count = $article->[$idx];
-                    $path_count = ($path_count =~ s@!@@g) || 0;
-                    if (substr($pathSteps, 0, 1) eq '-') {
-                        $skip_due_to_hdrs = 1 if $path_count >= $path_limit;
-                    } elsif (substr($pathSteps, 0, 1) eq '+') {
-                        $skip_due_to_hdrs = 1 if $path_count <= $path_limit;
+                if ($article->[$idx] =~ m!^Path:\s*!i) {
+                    if (defined $pathSteps) {
+                        my $path_count = $article->[$idx];
+                        $path_count = ($path_count =~ s@!@@g) || 0;
+                        if (substr($pathSteps, 0, 1) eq '-') {
+                            $skip_due_to_hdrs = 1 if $path_count >= $path_limit;
+                        } elsif (substr($pathSteps, 0, 1) eq '+') {
+                            $skip_due_to_hdrs = 1 if $path_count <= $path_limit;
+                        }
                     }
                     if ($skip_due_to_hdrs) {
                         print LOG "\tDEBUGGING $i\tNpath_skip_art $i\n" if $debug >= 2;
-                    } elsif (defined $opt_F) {
-                        $tx_len += length($opt_F)+1;
-                        $article->[$idx] =~ s/^Path:\s*/$&$opt_F!/i;
+                    } else {
+                        if (defined $opt_F) {
+                            $tx_len += length($opt_F)+1;
+                            $article->[$idx] =~ s/^Path:\s*/$&$opt_F!/i;
+                        }
                     }
                 }
 




More information about the inn-committers mailing list