diff options
author | Corey Farrell <git@cfware.com> | 2016-10-27 22:49:43 -0400 |
---|---|---|
committer | Corey Farrell <git@cfware.com> | 2016-10-28 10:24:26 -0500 |
commit | d6ad86789702ab2e4161c5ea086cdae64c9b614d (patch) | |
tree | ccbcc08dca493d7f0096d897a55a79c80e67bb8f /include | |
parent | 0ec5abe59286ed02377c2d7fe25d2e2e9babc58a (diff) |
Fix shutdown crash caused by modules being left open.
It is only safe to run ast_register_cleanup callbacks when all modules
have been unloaded. Previously these callbacks were run during graceful
shutdown, making it possible to crash during shutdown.
ASTERISK-26513 #close
Change-Id: Ibfa635bb688d1227ec54aa211d90d6bd45052e21
Diffstat (limited to 'include')
-rw-r--r-- | include/asterisk/_private.h | 1 | ||||
-rw-r--r-- | include/asterisk/module.h | 7 |
2 files changed, 1 insertions, 7 deletions
diff --git a/include/asterisk/_private.h b/include/asterisk/_private.h index 36b316f2a..b3c2b2002 100644 --- a/include/asterisk/_private.h +++ b/include/asterisk/_private.h @@ -16,6 +16,7 @@ #define _ASTERISK__PRIVATE_H int load_modules(unsigned int); /*!< Provided by loader.c */ +int modules_shutdown(void); /*!< Provided by loader.c */ int load_pbx(void); /*!< Provided by pbx.c */ int load_pbx_builtins(void); /*!< Provided by pbx_builtins.c */ int load_pbx_functions_cli(void); /*!< Provided by pbx_functions.c */ diff --git a/include/asterisk/module.h b/include/asterisk/module.h index d5616e9d8..a80c7f843 100644 --- a/include/asterisk/module.h +++ b/include/asterisk/module.h @@ -228,13 +228,6 @@ int ast_loader_register(int (*updater)(void)); */ int ast_loader_unregister(int (*updater)(void)); -/*! - * \brief Run the unload() callback for all loaded modules - * - * This function should be called when Asterisk is shutting down gracefully. - */ -void ast_module_shutdown(void); - /*! * \brief Match modules names for the Asterisk cli. * \param line Unused by this function, but this should be the line we are |