From f06f9fc6aa5817b67e5708689d0d254eda208ad3 Mon Sep 17 00:00:00 2001 From: Darold Gilles Date: Mon, 27 May 2013 23:48:55 +0200 Subject: [PATCH] Fix issue in Domain report where domain of top url was not found in the domain report even if the download was bigger than those reported. Thanks to Aubert Thibaud for the report. --- SquidAnalyzer.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/SquidAnalyzer.pm b/SquidAnalyzer.pm index 34253e5..b3beb20 100644 --- a/SquidAnalyzer.pm +++ b/SquidAnalyzer.pm @@ -2609,9 +2609,9 @@ sub _print_top_domain_stat if ($url =~ /([^\.]+)(\.[^\.]+)$/) { $perdomain{$2}{hits} += $hits; $perdomain{$2}{bytes} += $bytes; - $domain_stat{"$1$2"}{hits} = $hits; - $domain_stat{"$1$2"}{bytes} = $bytes; - $domain_stat{"$1$2"}{duration} = $duration; + $domain_stat{"$1$2"}{hits} += $hits; + $domain_stat{"$1$2"}{bytes} += $bytes; + $domain_stat{"$1$2"}{duration} += $duration; $domain_stat{"$1$2"}{firsthit} = $first if (!$domain_stat{"$1$2"}{firsthit} || ($first < $domain_stat{"$1$2"}{firsthit})); $domain_stat{"$1$2"}{lasthit} = $last if (!$domain_stat{"$1$2"}{lasthit} || ($last > $domain_stat{"$1$2"}{lasthit})); $domain_stat{"$1$2"}{users}{$user}++ if ($self->{TopUrlUser}); @@ -2619,8 +2619,8 @@ sub _print_top_domain_stat } else { $perdomain{'other'}{hits} += $hits; $perdomain{'other'}{bytes} += $bytes; - $domain_stat{'unknown'}{hits} = $hits; - $domain_stat{'unknown'}{bytes} = $bytes; + $domain_stat{'unknown'}{hits} += $hits; + $domain_stat{'unknown'}{bytes} += $bytes; $domain_stat{'unknown'}{duration} = $duration; $domain_stat{'unknown'}{firsthit} = $first if (!$domain_stat{'unknown'}{firsthit} || ($first < $domain_stat{'unknown'}{firsthit})); $domain_stat{'unknown'}{lasthit} = $last if (!$domain_stat{'unknown'}{lasthit} || ($last > $domain_stat{'unknown'}{lasthit}));