Module: kamailio Branch: master Commit: cb029e9b279fa4deaa186eae994fe2b2c9a1a38c URL: https://github.com/kamailio/kamailio/commit/cb029e9b279fa4deaa186eae994fe2b2...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2024-11-21T18:54:58+01:00
dialplan: disable destroy of internal hash tables on mod-destroy callback
- it is safer and faster to be removed at once by core or OS when application context is destroyed
---
Modified: src/modules/dialplan/dp_db.c
---
Diff: https://github.com/kamailio/kamailio/commit/cb029e9b279fa4deaa186eae994fe2b2... Patch: https://github.com/kamailio/kamailio/commit/cb029e9b279fa4deaa186eae994fe2b2...
---
diff --git a/src/modules/dialplan/dp_db.c b/src/modules/dialplan/dp_db.c index 64d2a4f3b12..19a30d5194f 100644 --- a/src/modules/dialplan/dp_db.c +++ b/src/modules/dialplan/dp_db.c @@ -257,15 +257,19 @@ void destroy_data(void) pcre2_general_context_free(dpl_gctx); }
+#if 0 + /* let shm-free be done all-at-once by process shutdown */ if(dp_rules_hash) { destroy_hash(0); destroy_hash(1); shm_free(dp_rules_hash); dp_rules_hash = 0; } +#endif
- if(dp_crt_idx) + if(dp_crt_idx) { shm_free(dp_crt_idx); + } }