mirror of https://github.com/sipwise/kamailio.git
* remove destroy of internal structures on mod-destroy callback
Change-Id: Ice2361535d1a656b8170232a9298f376a33bc11b
(cherry picked from commit 0fc97032fc)
mr13.1
parent
e62103154d
commit
e80c2d573b
@ -0,0 +1,21 @@
|
||||
From: Victor Seva <vseva@sipwise.com>
|
||||
Date: Mon, 9 Dec 2024 10:22:05 +0100
|
||||
Subject: usrloc: don't synchronize on destroy for DB_ONLY
|
||||
|
||||
---
|
||||
src/modules/usrloc/usrloc_mod.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/modules/usrloc/usrloc_mod.c b/src/modules/usrloc/usrloc_mod.c
|
||||
index 0093058..0df21d3 100644
|
||||
--- a/src/modules/usrloc/usrloc_mod.c
|
||||
+++ b/src/modules/usrloc/usrloc_mod.c
|
||||
@@ -620,7 +620,7 @@ static void destroy(void)
|
||||
{
|
||||
/* we need to sync DB in order to flush the cache */
|
||||
if(ul_dbh) {
|
||||
- if(synchronize_all_udomains(0, 1) != 0) {
|
||||
+ if(ul_db_mode != DB_ONLY && synchronize_all_udomains(0, 1) != 0) {
|
||||
LM_ERR("flushing cache failed\n");
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
From: Daniel-Constantin Mierla <miconda@gmail.com>
|
||||
Date: Wed, 20 Nov 2024 11:21:58 +0100
|
||||
Subject: dialog: remove destroy of internal structures on mod-destroy
|
||||
callback
|
||||
|
||||
- it is safer and faster to be removed at once by core or OS when application
|
||||
context is destroyed
|
||||
---
|
||||
src/modules/dialog/dialog.c | 8 --------
|
||||
1 file changed, 8 deletions(-)
|
||||
|
||||
diff --git a/src/modules/dialog/dialog.c b/src/modules/dialog/dialog.c
|
||||
index 43752da..338f7f6 100644
|
||||
--- a/src/modules/dialog/dialog.c
|
||||
+++ b/src/modules/dialog/dialog.c
|
||||
@@ -865,14 +865,6 @@ static void mod_destroy(void)
|
||||
dialog_update_db(0, 0);
|
||||
destroy_dlg_db();
|
||||
}
|
||||
- dlg_bridge_destroy_hdrs();
|
||||
- /* no DB interaction from now on */
|
||||
- dlg_db_mode = DB_MODE_NONE;
|
||||
- destroy_dlg_table();
|
||||
- destroy_dlg_timer();
|
||||
- destroy_dlg_callbacks(DLGCB_CREATED | DLGCB_LOADED);
|
||||
- destroy_dlg_handlers();
|
||||
- destroy_dlg_profiles();
|
||||
}
|
||||
|
||||
|
||||
@ -0,0 +1,23 @@
|
||||
From: Daniel-Constantin Mierla <miconda@gmail.com>
|
||||
Date: Wed, 20 Nov 2024 11:41:33 +0100
|
||||
Subject: htable: remove destroy of internal structures on mod-destroy
|
||||
callback
|
||||
|
||||
- it is safer and faster to be removed at once by core or OS when application
|
||||
context is destroyed
|
||||
---
|
||||
src/modules/htable/htable.c | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/src/modules/htable/htable.c b/src/modules/htable/htable.c
|
||||
index 0fcd280..f98fe97 100644
|
||||
--- a/src/modules/htable/htable.c
|
||||
+++ b/src/modules/htable/htable.c
|
||||
@@ -341,7 +341,6 @@ static void destroy(void)
|
||||
}
|
||||
}
|
||||
}
|
||||
- ht_destroy();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -0,0 +1,42 @@
|
||||
From: Daniel-Constantin Mierla <miconda@gmail.com>
|
||||
Date: Wed, 20 Nov 2024 12:04:16 +0100
|
||||
Subject: presence: remove destroy of internal structures on mod-destroy
|
||||
callback
|
||||
|
||||
- it is safer and faster to be removed at once by core or OS when application
|
||||
context is destroyed
|
||||
---
|
||||
src/modules/presence/presence.c | 20 --------------------
|
||||
1 file changed, 20 deletions(-)
|
||||
|
||||
diff --git a/src/modules/presence/presence.c b/src/modules/presence/presence.c
|
||||
index 9315c0d..dae0bf7 100644
|
||||
--- a/src/modules/presence/presence.c
|
||||
+++ b/src/modules/presence/presence.c
|
||||
@@ -635,26 +635,6 @@ static void destroy(void)
|
||||
} else
|
||||
timer_db_update(0, 0);
|
||||
}
|
||||
-
|
||||
- if(subs_htable) {
|
||||
- destroy_shtable(subs_htable, shtable_size);
|
||||
- }
|
||||
-
|
||||
- if(pres_htable) {
|
||||
- destroy_phtable();
|
||||
- }
|
||||
-
|
||||
- if(pa_db && pa_dbf.close) {
|
||||
- pa_dbf.close(pa_db);
|
||||
- }
|
||||
-
|
||||
- if(pres_notifier_id != NULL) {
|
||||
- shm_free(pres_notifier_id);
|
||||
- }
|
||||
-
|
||||
- destroy_evlist();
|
||||
-
|
||||
- ps_ptable_destroy();
|
||||
}
|
||||
|
||||
static int fixup_presence(void **param, int param_no)
|
||||
@ -0,0 +1,36 @@
|
||||
From: Daniel-Constantin Mierla <miconda@gmail.com>
|
||||
Date: Wed, 20 Nov 2024 12:08:14 +0100
|
||||
Subject: pua: remove destroy of internal structures on mod-destroy callback
|
||||
|
||||
- it is safer and faster to be removed at once by core or OS when application
|
||||
context is destroyed
|
||||
---
|
||||
src/modules/pua/pua.c | 8 --------
|
||||
1 file changed, 8 deletions(-)
|
||||
|
||||
diff --git a/src/modules/pua/pua.c b/src/modules/pua/pua.c
|
||||
index a53bfd8..d69578c 100644
|
||||
--- a/src/modules/pua/pua.c
|
||||
+++ b/src/modules/pua/pua.c
|
||||
@@ -296,21 +296,13 @@ static int child_init(int rank)
|
||||
|
||||
static void destroy(void)
|
||||
{
|
||||
- if(puacb_list)
|
||||
- destroy_puacb_list();
|
||||
-
|
||||
/* if dbmode is PUA_DB_ONLY, then HashT will be NULL
|
||||
* so db_update and destroy_htable won't get called */
|
||||
if(pua_db && HashT)
|
||||
db_update(0, 0);
|
||||
|
||||
- if(HashT)
|
||||
- destroy_htable();
|
||||
-
|
||||
if(pua_db)
|
||||
pua_dbf.close(pua_db);
|
||||
- if(pua_evlist)
|
||||
- destroy_pua_evlist();
|
||||
|
||||
return;
|
||||
}
|
||||
@ -0,0 +1,38 @@
|
||||
From: Daniel-Constantin Mierla <miconda@gmail.com>
|
||||
Date: Wed, 20 Nov 2024 11:28:34 +0100
|
||||
Subject: tm: remove destroy of internal structures on mod-destroy callback
|
||||
|
||||
- it is safer and faster to be removed at once by core or OS when application
|
||||
context is destroyed
|
||||
---
|
||||
src/modules/tm/t_funcs.c | 17 -----------------
|
||||
1 file changed, 17 deletions(-)
|
||||
|
||||
diff --git a/src/modules/tm/t_funcs.c b/src/modules/tm/t_funcs.c
|
||||
index 5515a4a..92a7e79 100644
|
||||
--- a/src/modules/tm/t_funcs.c
|
||||
+++ b/src/modules/tm/t_funcs.c
|
||||
@@ -87,23 +87,6 @@ int send_pr_buffer(struct retr_buf *rb, void *buf, int len
|
||||
|
||||
void tm_shutdown()
|
||||
{
|
||||
-
|
||||
- LM_DBG("start\n");
|
||||
-
|
||||
-#ifdef USE_DNS_FAILOVER
|
||||
- if(failover_reply_codes)
|
||||
- shm_free(failover_reply_codes);
|
||||
- if(failover_reply_codes_cnt)
|
||||
- shm_free(failover_reply_codes_cnt);
|
||||
-#endif
|
||||
- /* destroy the hash table */
|
||||
- LM_DBG("emptying hash table\n");
|
||||
- free_hash_table();
|
||||
- LM_DBG("removing semaphores\n");
|
||||
- lock_cleanup();
|
||||
- LM_DBG("destroying tmcb lists\n");
|
||||
- destroy_tmcb_lists();
|
||||
- free_tm_stats();
|
||||
LM_DBG("done\n");
|
||||
}
|
||||
|
||||
@ -0,0 +1,29 @@
|
||||
From: Daniel-Constantin Mierla <miconda@gmail.com>
|
||||
Date: Wed, 20 Nov 2024 11:37:40 +0100
|
||||
Subject: usrloc: remove destroy of internal structures on mod-destroy
|
||||
callback
|
||||
|
||||
- it is safer and faster to be removed at once by core or OS when application
|
||||
context is destroyed
|
||||
---
|
||||
src/modules/usrloc/usrloc_mod.c | 6 ------
|
||||
1 file changed, 6 deletions(-)
|
||||
|
||||
diff --git a/src/modules/usrloc/usrloc_mod.c b/src/modules/usrloc/usrloc_mod.c
|
||||
index 1443953..0093058 100644
|
||||
--- a/src/modules/usrloc/usrloc_mod.c
|
||||
+++ b/src/modules/usrloc/usrloc_mod.c
|
||||
@@ -623,13 +623,7 @@ static void destroy(void)
|
||||
if(synchronize_all_udomains(0, 1) != 0) {
|
||||
LM_ERR("flushing cache failed\n");
|
||||
}
|
||||
- ul_dbf.close(ul_dbh);
|
||||
}
|
||||
-
|
||||
- free_all_udomains();
|
||||
-
|
||||
- /* free callbacks list */
|
||||
- destroy_ulcb_list();
|
||||
}
|
||||
|
||||
/*! \brief
|
||||
Loading…
Reference in new issue