[asterisk-dev] [Code Review] 4610: res_pjsip_config_wizard: Cleanup load unload
Matt Jordan
reviewboard at asterisk.org
Fri Apr 10 09:49:15 CDT 2015
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4610/#review15178
-----------------------------------------------------------
Ship it!
Ship It!
- Matt Jordan
On April 9, 2015, 5:50 p.m., George Joseph wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/4610/
> -----------------------------------------------------------
>
> (Updated April 9, 2015, 5:50 p.m.)
>
>
> Review request for Asterisk Developers.
>
>
> 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/b15773d2/attachment-0001.html>
More information about the asterisk-dev
mailing list