From: Stefan Schantl Date: Fri, 12 Jun 2020 16:07:55 +0000 (+0200) Subject: logs.cgi/firewalllog.dat: Use location-functions.pl X-Git-Tag: v2.25-core148~51 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e4f1e36c9fac067f5e9e304b6c306e2cfc3293de;p=ipfire-2.x.git logs.cgi/firewalllog.dat: Use location-functions.pl Signed-off-by: Stefan Schantl --- diff --git a/html/cgi-bin/logs.cgi/firewalllog.dat b/html/cgi-bin/logs.cgi/firewalllog.dat index 6d07b62844..2b690e35b7 100644 --- a/html/cgi-bin/logs.cgi/firewalllog.dat +++ b/html/cgi-bin/logs.cgi/firewalllog.dat @@ -20,12 +20,12 @@ use Getopt::Std; #use CGI::Carp 'fatalsToBrowser'; require '/var/ipfire/general-functions.pl'; -require "${General::swroot}/geoip-functions.pl"; +require "${General::swroot}/location-functions.pl"; require "${General::swroot}/lang.pl"; require "${General::swroot}/header.pl"; # Libloc database handle. -my $libloc_db_handle = &GeoIP::init(); +my $libloc_db_handle = &Location::Functions::init(); my %color = (); my %mainsettings = (); @@ -354,7 +354,7 @@ foreach $_ (@log) $srcport=$1 if $packet =~ /SPT=(\d+)/; $dstport=$1 if $packet =~ /DPT=(\d+)/; - my $ccode = &GeoIP::lookup_country_code($libloc_db_handle, $srcaddr); + my $ccode = &Location::Functions::lookup_country_code($libloc_db_handle, $srcaddr); my $servi = uc(getservbyport($srcport, lc($proto))); if ($servi ne '' && $srcport < 1024) { @@ -386,7 +386,7 @@ foreach $_ (@log) END ; # Get flag icon for of the country. - my $flag_icon = &GeoIP::get_flag_icon($ccode); + my $flag_icon = &Location::Functions::get_flag_icon($ccode); if ( $flag_icon) { print "$ccode";