From 83ccdf7feab64b54b0584161182d4ef90d6bb149 Mon Sep 17 00:00:00 2001 From: Stefan Schantl Date: Fri, 6 Dec 2019 14:36:48 +0100 Subject: [PATCH] openvpnmain.cgi: Use new location lookup method. Signed-off-by: Stefan Schantl --- html/cgi-bin/ovpnmain.cgi | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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++; -- 2.39.5