]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - html/cgi-bin/logs.cgi/showrequestfromcountry.dat
logs.cgi/*: Use new location lookup method.
[ipfire-2.x.git] / html / cgi-bin / logs.cgi / showrequestfromcountry.dat
index 69835370b154acdaf8676bbd28640726497e70d4..2754830752a5dcbe084c0c29ebc0814338f45462 100644 (file)
@@ -19,6 +19,9 @@ require "${General::swroot}/geoip-functions.pl";
 require "${General::swroot}/lang.pl";
 require "${General::swroot}/header.pl";
 
+# Libloc database handle.
+my $libloc_db_handle = &GeoIP::init();
+
 use POSIX();
 
 #workaround to suppress a warning when a variable is used only once
@@ -178,7 +181,7 @@ if (!$skip)
                        }
                        elsif($srcaddr ne '') {
                                # or srcaddr matches country code
-                               my $ccode = &GeoIP::lookup($srcaddr);
+                               my $ccode = &GeoIP::lookup_country_code($libloc_db_handle, $srcaddr);
                                if($ccode eq uc($country)){
                                        $log[$lines] = $_;
                                        $lines++;