mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-05-11 01:38:25 +02:00
libloc: Update to 0.9.4
Also update to the shipped database to 2020-09-21. 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
33975f578d
commit
8be7a2206c
@@ -1,24 +0,0 @@
|
||||
commit 61d3516bbfce6b4e6393825329c07b1e2a88d47d
|
||||
Author: Michael Tremer <michael.tremer@ipfire.org>
|
||||
Date: Mon Jul 13 10:47:30 2020 +0000
|
||||
|
||||
country: Terminate buffer when reading from database
|
||||
|
||||
Compilers on ARM do not seem to initialise the buffer.
|
||||
|
||||
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
|
||||
|
||||
diff --git a/src/country.c b/src/country.c
|
||||
index d6ddf50..2ba93e6 100644
|
||||
--- a/src/country.c
|
||||
+++ b/src/country.c
|
||||
@@ -125,6 +125,9 @@ int loc_country_new_from_database_v1(struct loc_ctx* ctx, struct loc_stringpool*
|
||||
// Read country code
|
||||
loc_country_code_copy(buffer, dbobj->code);
|
||||
|
||||
+ // Terminate buffer
|
||||
+ buffer[2] = '\0';
|
||||
+
|
||||
// Create a new country object
|
||||
int r = loc_country_new(ctx, country, buffer);
|
||||
if (r)
|
||||
@@ -1,22 +0,0 @@
|
||||
commit 1be0681cc4bcc006369e69d90dc4439eaa6f58d5
|
||||
Author: Stefan Schantl <stefan.schantl@ipfire.org>
|
||||
Date: Wed Jul 29 18:50:20 2020 +0200
|
||||
|
||||
location: Provide a return code if the database does not need to be
|
||||
updated.
|
||||
|
||||
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
|
||||
|
||||
diff --git a/src/python/location.in b/src/python/location.in
|
||||
index 5211b28..8cdd140 100644
|
||||
--- a/src/python/location.in
|
||||
+++ b/src/python/location.in
|
||||
@@ -416,7 +416,7 @@ class CLI(object):
|
||||
_("The datase has recently be updated recently (%s)") % \
|
||||
format_timedelta(now - t),
|
||||
)
|
||||
- return
|
||||
+ return 3
|
||||
|
||||
# Fetch the timestamp we need from DNS
|
||||
t = location.discover_latest_version()
|
||||
Reference in New Issue
Block a user