Review Board 1.7.16


res_pjsip_config_wizard: Cleanup load unload

Review Request #4610 - Created April 9, 2015 and submitted

George Joseph
13
Reviewers
asterisk-dev
Asterisk
While investigating other unload issues I realized that the load/unload process for the config wizard was pretty ugly so I've refactored it as follows...

When the res_pjsip sorcery instance is created the config_wizard bumps it's own module reference to prevent it from unloading while the sorcery instance is still active.  When res_pjsip unloads and it's sorcery instance is destroyed, the config wizard unrefs itself which then allows itself to unload cleanly.  Since the config wizard now can't load after res_pjsip or unload before it (which should have been the correct behavior all along), I was able to remove the chunks of code in both load_module and unload_module that handled that case.

Ran the testsuite tests to insure there were no functional changes and REF_DEBUG to insure that Asterisk was shutting down cleanly with no FRACKs or leaks.
Review request changed
Updated (April 10, 2015, 12:24 p.m.)
  • changed from pending to submitted
Committed in revision 434636

https://reviewboard.asterisk.org/ runs on a server provided by Digium, Inc. and uses bandwidth donated to the open source Asterisk community by API Digital Communications in Huntsville, AL USA.
Please report problems with this site to asteriskteam@digium.com.