mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-10 11:58:08 +00:00
Allow shutdown to unload modules that register bucket scheme's or codec's.
* Change __ast_module_shutdown_ref to be NULL safe (11+). * Allow modules that call ast_bucket_scheme_register or ast_codec_register to be unloaded during graceful shutdown only (13+ only). ASTERISK-24796 #close Reported by: Corey Farrell Review: https://reviewboard.asterisk.org/r/4428/ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@432058 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1378,11 +1378,13 @@ struct ast_module *__ast_module_ref(struct ast_module *mod, const char *file, in
|
||||
|
||||
void __ast_module_shutdown_ref(struct ast_module *mod, const char *file, int line, const char *func)
|
||||
{
|
||||
if (!mod->flags.keepuntilshutdown) {
|
||||
if (!mod || mod->flags.keepuntilshutdown) {
|
||||
return;
|
||||
}
|
||||
|
||||
__ast_module_ref(mod, file, line, func);
|
||||
mod->flags.keepuntilshutdown = 1;
|
||||
}
|
||||
}
|
||||
|
||||
void __ast_module_unref(struct ast_module *mod, const char *file, int line, const char *func)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user