]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - html/cgi-bin/logs.cgi/showrequestfromcountry.dat
Adjust CGI files to work with latest location-function.pl changes.
[people/pmueller/ipfire-2.x.git] / html / cgi-bin / logs.cgi / showrequestfromcountry.dat
index 4d80e77a4d68fa2bacba9f275c1df842bd2d9c4c..2a246ec60e9fbe5a7c5af804057796ed7bc99c9b 100644 (file)
@@ -19,9 +19,6 @@ require "${General::swroot}/location-functions.pl";
 require "${General::swroot}/lang.pl";
 require "${General::swroot}/header.pl";
 
-# Libloc database handle.
-my $libloc_db_handle = &Location::Functions::init();
-
 use POSIX();
 
 #workaround to suppress a warning when a variable is used only once
@@ -181,7 +178,7 @@ if (!$skip)
                        }
                        elsif($srcaddr ne '') {
                                # or srcaddr matches country code
-                               my $ccode = &Location::Functions::lookup_country_code($libloc_db_handle, $srcaddr);
+                               my $ccode = &Location::Functions::lookup_country_code($srcaddr);
                                if($ccode eq uc($country)){
                                        $log[$lines] = $_;
                                        $lines++;
@@ -352,7 +349,7 @@ foreach $_ (@slice)
        if($iface eq $country || $srcaddr ne '') {
                my $ccode='';
                if($iface ne $country) {
-                       $ccode = &Location::Functions::lookup_country_code($libloc_db_handle, $srcaddr);
+                       $ccode = &Location::Functions::lookup_country_code($srcaddr);
                }
                if($iface eq $country || $ccode eq uc($country)) {
                        my $chain = '';