From: Stefan Schantl Date: Fri, 6 Dec 2019 13:36:48 +0000 (+0100) Subject: openvpnmain.cgi: Use new location lookup method. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=83ccdf7feab64b54b0584161182d4ef90d6bb149;p=people%2Fstevee%2Fipfire-2.x.git openvpnmain.cgi: Use new location lookup method. Signed-off-by: Stefan Schantl --- diff --git a/html/cgi-bin/ovpnmain.cgi b/html/cgi-bin/ovpnmain.cgi index 09f0dc42f7..9c59276a4f 100644 --- a/html/cgi-bin/ovpnmain.cgi +++ b/html/cgi-bin/ovpnmain.cgi @@ -2982,6 +2982,9 @@ END &Header::openbigbox('100%', 'LEFT', '', ''); &Header::openbox('100%', 'LEFT', $Lang::tr{'ovpn con stat'}); + # Libloc database handle. + my $libloc_db_handle = &GeoIP::init(); + # # $Lang::tr{'protocol'} # protocol temp removed @@ -3032,7 +3035,7 @@ END $users[$uid]{'Proto'} = $proto; # get country code for "RealAddress"... - my $ccode = &GeoIP::lookup((split ':', $users[$uid]{'RealAddress'})[0]); + my $ccode = &GeoIP::lookup_country_code($libloc_db_handle, (split ':', $users[$uid]{'RealAddress'})[0]); my $flag_icon = &GeoIP::get_flag_icon($ccode); $users[$uid]{'Country'} = "$ccode"; $uid++;