Module: kamailio Branch: master Commit: 132a0024394494da8766c31c94f42822c79a0a51 URL: https://github.com/kamailio/kamailio/commit/132a0024394494da8766c31c94f42822...
Author: Xenofon Karamanos xk@gilawa.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2023-11-21T11:22:14+01:00
topos: Close db connection
---
Modified: src/modules/topos/topos_mod.c
---
Diff: https://github.com/kamailio/kamailio/commit/132a0024394494da8766c31c94f42822... Patch: https://github.com/kamailio/kamailio/commit/132a0024394494da8766c31c94f42822...
---
diff --git a/src/modules/topos/topos_mod.c b/src/modules/topos/topos_mod.c index 3d570953cff..d7efd055535 100644 --- a/src/modules/topos/topos_mod.c +++ b/src/modules/topos/topos_mod.c @@ -272,6 +272,10 @@ static int mod_init(void) DB_TABLE_VERSION_ERROR(tt_table_name); goto dberror; } + if(topos_db_con) { + _tpsdbf.close(topos_db_con); + topos_db_con = NULL; + } } else { if(_tps_storage.len != 7 && strncmp(_tps_storage.s, "redis", 5) != 0) { LM_ERR("unknown storage type: %.*s\n", _tps_storage.len,