mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-12 04:05:53 +02:00
location-functions.pl: Remove accidently keept 2nd DB init call.
The get_full_country_name() function had an accidenlty and not longer required call of the DB init function. This is a waste of memory and a known problem, especially on systems with less than 1GB of RAM, where the application which uses libloc in such a redundant way crashes. Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org> Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
committed by
Michael Tremer
parent
460741fd14
commit
aa9dd5386c
@@ -163,9 +163,6 @@ sub get_full_country_name($) {
|
||||
# Grab location name from hash.
|
||||
$name = $not_iso_3166_location{$code};
|
||||
} else {
|
||||
# Init libloc database connection.
|
||||
my $db_handle = &init();
|
||||
|
||||
# Get the country name by using the location module.
|
||||
$name = &Location::get_country_name($db_handle, $code);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user