From: eldy <> Date: Sat, 6 Dec 2003 18:49:59 +0000 (+0000) Subject: Fixed bug in SkipHosts filter for mail log files. X-Git-Tag: AWSTATS_6_0_BETA~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ca37ecef3255770f608502edd033a448a31dbdba;p=thirdparty%2FAWStats.git Fixed bug in SkipHosts filter for mail log files. --- diff --git a/docs/awstats_changelog.txt b/docs/awstats_changelog.txt index 42ccc148..f0f54cf2 100644 --- a/docs/awstats_changelog.txt +++ b/docs/awstats_changelog.txt @@ -29,6 +29,7 @@ Fixes: that match a dropping criteria (SkipFiles, Skip..., Only...). - Click on "Summary" now returns to top of page even with rawlog plugin. - Fixed AmigaVoyager detection. +- Fixed bug in SkipHosts filter for mail log files. New features/improvements: - Increased speed by 10 to 20%. diff --git a/wwwroot/cgi-bin/awstats.pl b/wwwroot/cgi-bin/awstats.pl index d9d29304..80c9236a 100644 --- a/wwwroot/cgi-bin/awstats.pl +++ b/wwwroot/cgi-bin/awstats.pl @@ -5837,7 +5837,7 @@ if ($UpdateStats && $FrameName ne 'index' && $FrameName ne 'mainleft') { # Updat if ($timerecord > $LastLine) { $LastLine = $timerecord; } # Test should always be true except with not sorted log files # Skip for some client host IP addresses, some URLs, other URLs - if (@SkipHosts && (&SkipHost($field[$pos_host]) || ($pos_hostr && &SkipHost($field[$pos_hostr])))) { $qualifdrop="Dropped record (host $field[$pos_host] not qualified by SkipHosts)"; } + if (@SkipHosts && (&SkipHost($field[$pos_host]) || ($pos_hostr && &SkipHost($field[$pos_hostr])))) { $qualifdrop="Dropped record (host $field[$pos_host]".($pos_hostr?" and $field[$pos_hostr]":"")." not qualified by SkipHosts)"; } elsif (@SkipFiles && &SkipFile($field[$pos_url])) { $qualifdrop="Dropped record (URL $field[$pos_url] not qualified by SkipFiles)"; } elsif (@SkipUserAgents && $pos_agent >= 0 && &SkipUserAgent($field[$pos_agent])) { $qualifdrop="Dropped record (user agent '$field[$pos_agent]' not qualified by SkipUserAgents)"; } elsif (@OnlyHosts && ! &OnlyHost($field[$pos_host]) && (! $pos_hostr || ! &OnlyHost($field[$pos_hostr]))) { $qualifdrop="Dropped record (host $field[$pos_host]".($pos_hostr?" and $field[$pos_hostr]":"")." not qualified by OnlyHosts)"; }