[asterisk-dev] [Code Review] 4610: res_pjsip_config_wizard: Cleanup load unload

George Joseph reviewboard at asterisk.org
Fri Apr 10 12:00:20 CDT 2015


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4610/
-----------------------------------------------------------

(Updated April 10, 2015, noon)


Status
------

This change has been marked as submitted.


Review request for Asterisk Developers.


Changes
-------

Committed in revision 434619


Repository: Asterisk


Description
-------

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.


Diffs
-----

  branches/13/res/res_pjsip_config_wizard.c 434545 

Diff: https://reviewboard.asterisk.org/r/4610/diff/


Testing
-------

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.


Thanks,

George Joseph

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20150410/b33c738a/attachment.html>


More information about the asterisk-dev mailing list