mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-26 22:30:28 +00:00
Fix graceful shutdown crash.
The cleanup code for optional_api needs to happen after all of the optional API users and providers have unused/unprovided. Unfortunately, regsitering the atexit() handler at the beginning of main() isn't soon enough, since module destructors run after that. ........ Merged revisions 398149 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398150 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -176,14 +176,6 @@ void ast_optional_api_use(const char *symname, ast_optional_fn *optional_ref,
|
||||
void ast_optional_api_unuse(const char *symname, ast_optional_fn *optional_ref,
|
||||
const char *module);
|
||||
|
||||
/*!
|
||||
* \brief Call at exit to clean up optional_api internals.
|
||||
*
|
||||
* Since the optional_api code might run before main() starts, it can't safely
|
||||
* register its own cleanup handlers. That has to be done within main().
|
||||
*/
|
||||
void optional_api_cleanup(void);
|
||||
|
||||
#define AST_OPTIONAL_API_NAME(name) __##name
|
||||
|
||||
#if defined(AST_API_MODULE)
|
||||
|
||||
Reference in New Issue
Block a user