Module: kamailio
Branch: master
Commit: 132a0024394494da8766c31c94f42822c79a0a51
URL: 
https://github.com/kamailio/kamailio/commit/132a0024394494da8766c31c94f42822c79a0a51

Author: Xenofon Karamanos <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
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/132a0024394494da8766c31c94f42822c79a0a51.diff
Patch: 
https://github.com/kamailio/kamailio/commit/132a0024394494da8766c31c94f42822c79a0a51.patch

---

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,

_______________________________________________
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to [email protected]

Reply via email to