telize

High performance JSON IP and GeoIP REST API (IP Geolocation)
Log | Files | Refs | README | LICENSE

commit cc16857dc987eef7f218e8536fa084ba8531fc13
parent 52f48a90f598cca6058cd58ef6ef4d919c745d9f
Author: Frederic Cambus <fred@statdns.com>
Date:   Sun,  4 Apr 2021 11:31:20 +0200

Use new GEOIP2DB_CITY and GEOIP2DB_ASN macros to load MMDB databases.

Diffstat:
Msrc/utils.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/utils.c b/src/utils.c @@ -4,7 +4,7 @@ * https://www.telize.com * * Created: 2013-08-15 - * Last Updated: 2021-03-29 + * Last Updated: 2021-04-04 * * Telize is released under the BSD 2-Clause license. * See LICENSE file for details. @@ -24,11 +24,11 @@ telize_init(int state) return (KORE_RESULT_OK); } - if (MMDB_open(GEOIP2DIR "GeoLite2-City.mmdb", + if (MMDB_open(GEOIP2DIR GEOIP2DB_CITY, MMDB_MODE_MMAP, &telize_city) != MMDB_SUCCESS) fatalx("can't open GeoLite2 City database: %s", errno_s); - if (MMDB_open(GEOIP2DIR "GeoLite2-ASN.mmdb", + if (MMDB_open(GEOIP2DIR GEOIP2DB_ASN, MMDB_MODE_MMAP, &telize_asn) != MMDB_SUCCESS) fatalx("can't open GeoLite2 ASN database: %s", errno_s);