Summary:ASTERISK-20346: Modules need to ensure that any functions, apps, AMI actions, etc. they register are unregistered if the module declines loading
Reporter:Mark Michelson (mmichelson)Labels:
Date Opened:2012-08-30 13:56:40Date Closed:2018-01-04 07:13:53.000-0600
Versions:SVN 10.7.0 11.0.0-beta1 13.18.4 Frequency of
Description:ASTERISK-20305 brought to light that app_confbridge would register its functions and applications, then would attempt to load configuration. If configuration loading failed, then the module would not load, but the functions and applications it registered would still be registered. In the case of app_confbridge, this eventually led to a crash.

Other modules need to be scanned and corrected as well. There are two methods of handling this:

1. Place any conditions that may result in AST_MODULE_LOAD_DECLINE before registering functions, applications, etc. This way, they will never be registered in the first place.
2. If (1) is not possible for a module, then ensure that cases where AST_MODULE_LOAD_DECLINE is returned unregister things properly.
Comments:By: Andrew Latham (lathama) 2012-08-30 19:57:22.777-0500

I started with examples here https://wiki.asterisk.org/wiki/display/AST/Modules after noticing that res_conf_ldap errors on a default install.  I will put these demos in the Doxygen docs.  Lets make the demos awesome and cover complex uses.

By: Friendly Automation (friendly-automation) 2018-01-04 07:13:54.062-0600

Change 7770 merged by Joshua Colp:
loader: Create ast_module_running_ref.


By: Friendly Automation (friendly-automation) 2018-01-04 14:50:18.757-0600

Change 7804 merged by Joshua Colp:
translators: Don't use ast_module_running_ref.