mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-09 11:28:25 +00:00
Destroy the generic_monitors container after the core_instances in ccss
For each item in core_instances disposed of in the shutdown of ccss, any generic monitor instances referenced by the objects will be removed from generic_monitors during their destruction. Hilarity ensues if generic_monitors no longer exists. Thanks to the Asterisk Test Suite's generic_ccss test for complaining loudly when it ran into this. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@374316 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -4324,14 +4324,15 @@ static void cc_shutdown(void)
|
|||||||
if (cc_core_taskprocessor) {
|
if (cc_core_taskprocessor) {
|
||||||
cc_core_taskprocessor = ast_taskprocessor_unreference(cc_core_taskprocessor);
|
cc_core_taskprocessor = ast_taskprocessor_unreference(cc_core_taskprocessor);
|
||||||
}
|
}
|
||||||
if (generic_monitors) {
|
/* Note that cc_core_instances must be disposed of prior to generic_monitors */
|
||||||
ao2_t_ref(generic_monitors, -1, "Unref generic_monitor container in cc_shutdown");
|
|
||||||
generic_monitors = NULL;
|
|
||||||
}
|
|
||||||
if (cc_core_instances) {
|
if (cc_core_instances) {
|
||||||
ao2_t_ref(cc_core_instances, -1, "Unref cc_core_instances container in cc_shutdown");
|
ao2_t_ref(cc_core_instances, -1, "Unref cc_core_instances container in cc_shutdown");
|
||||||
cc_core_instances = NULL;
|
cc_core_instances = NULL;
|
||||||
}
|
}
|
||||||
|
if (generic_monitors) {
|
||||||
|
ao2_t_ref(generic_monitors, -1, "Unref generic_monitor container in cc_shutdown");
|
||||||
|
generic_monitors = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int ast_cc_init(void)
|
int ast_cc_init(void)
|
||||||
|
|||||||
Reference in New Issue
Block a user