telize

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

commit 656fa2e21d484289974bd4b0dbf8a3927a328aba
parent 914ecb9277572b2c685a5df7fba8f77d7b06de79
Author: Frederic Cambus <fred@statdns.com>
Date:   Mon, 10 Jun 2019 09:11:40 +0200

Close database handle on module unload.

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

diff --git a/src/utils.c b/src/utils.c @@ -18,9 +18,10 @@ MMDB_s telize_city; int telize_init(int state) { - if (state != KORE_MODULE_LOAD) { - kore_log(LOG_NOTICE, "denying reload of module, not fixed"); - return (KORE_RESULT_ERROR); + if (state == KORE_MODULE_UNLOAD) { + MMDB_close(&telize_city); + MMDB_close(&telize_asn); + return (KORE_RESULT_OK); } if (MMDB_open("/var/db/GeoIP/GeoLite2-City.mmdb",