]> git.ipfire.org Git - thirdparty/AWStats.git/commitdiff
Fix bug [ 1064676 ] wrong replacement of unresolved ip in logresolvemerge.pl
authoreldy <>
Sat, 27 Nov 2004 14:32:00 +0000 (14:32 +0000)
committereldy <>
Sat, 27 Nov 2004 14:32:00 +0000 (14:32 +0000)
tools/logresolvemerge.pl

index 97e23c4bea8b0313e334bc7c254b54f04169d7d6..cef42f817727b7d774ba671aab598aec73d083be 100644 (file)
@@ -379,8 +379,10 @@ if ($DNSCache) {
        open(CACHE, "<$DNSCache") or error("Can't open cache file $DNSCache");
        while (<CACHE>) {
                my ($time, $ip, $name) = split;
-               $name='ip' if $name eq '*';
-               $MyDNSTable{$ip}=$name;
+        if ($ip && $name) {
+            $name="$ip" if $name eq '*';
+               $MyDNSTable{$ip}=$name;
+        }
        }
        close CACHE;
 }
@@ -502,8 +504,8 @@ while (1 == 1)
        # END Read new lines for each log file. After this, following var are filled
        # $timerecord{$logfilenb}
 
-       # We choose wich record of wich log file to process
-       if ($Debug) { debug("Choose of wich record of which log file to process",3); }
+       # We choose which record of which log file to process
+       if ($Debug) { debug("Choose which record of which log file to process",3); }
        $logfilechosen=-1;
        my $timeref="99999999999999";
        foreach my $logfilenb (keys %LogFileToDo) {