[asterisk-commits] coreyfarrell: branch 11 r432058 - /branches/11/main/loader.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Feb 20 20:55:29 CST 2015
Author: coreyfarrell
Date: Fri Feb 20 20:55:26 2015
New Revision: 432058
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=432058
Log:
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/
Modified:
branches/11/main/loader.c
Modified: branches/11/main/loader.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/main/loader.c?view=diff&rev=432058&r1=432057&r2=432058
==============================================================================
--- branches/11/main/loader.c (original)
+++ branches/11/main/loader.c Fri Feb 20 20:55:26 2015
@@ -1378,10 +1378,12 @@
void __ast_module_shutdown_ref(struct ast_module *mod, const char *file, int line, const char *func)
{
- if (!mod->flags.keepuntilshutdown) {
- __ast_module_ref(mod, file, line, func);
- mod->flags.keepuntilshutdown = 1;
- }
+ 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)
More information about the asterisk-commits
mailing list