]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_pjsip: make it unloadable (take 2)
authorKevin Harwell <kharwell@digium.com>
Tue, 27 Jan 2015 19:08:44 +0000 (19:08 +0000)
committerKevin Harwell <kharwell@digium.com>
Tue, 27 Jan 2015 19:08:44 +0000 (19:08 +0000)
commit9e3d316dd13970370f76e7e19982c8f571f3290b
tree15143640b90879a1257761aa9be6cb9e28ac4c4d
parenteda125f98dd1a11f41b7a89f96fbe3fb754c8963
res_pjsip: make it unloadable (take 2)

Due to the original patch causing memory corruptions it was removed until the
problem could be resolved. This patch is the original patch plus some added
locking around stasis router subcription that was needed to avoid the memory
corruption.

Description of the original problem and patch (still applicable):

The res_pjsip module was previously unloadable. With this patch it can now
be unloaded.

This patch is based off the original patch on the issue (listed below) by Corey
Farrell with a few modifications. Namely, removed a few changes not required to
make the module unloadable and also fixed a bug that would cause asterisk to
crash on unloading.

This patch is the first step (should hopefully be followed by another/others at
some point) in allowing res_pjsip and the modules that depend on it to be
unloadable. At this time, res_pjsip and some of the modules that depend on
res_pjsip cannot be unloaded without causing problems of some sort.

The goal of this patch is to get res_pjsip and only res_pjsip to be able to
unload successfully and/or shutdown without incident (crashes, leaks, etc...).
Other dependent modules may still cause problems on unload.

Basically made sure, with the patch applied, that res_pjsip (with no other
dependent modules loaded) could be succesfully unloaded and Asterisk could
shutdown without any leaks or crashes that pertained directly to res_pjsip.

ASTERISK-24485 #close
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/4363/
patches:
  pjsip_unload-broken-r1.patch submitted by Corey Farrell (license 5909)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431179 65c4cc65-6c06-0410-ace0-fbb531ad65f3
main/stasis_message_router.c
res/res_pjsip.c
res/res_pjsip/config_auth.c
res/res_pjsip/config_transport.c
res/res_pjsip/include/res_pjsip_private.h
res/res_pjsip/location.c
res/res_pjsip/pjsip_configuration.c
res/res_pjsip/pjsip_distributor.c
res/res_pjsip/pjsip_global_headers.c
res/res_pjsip/pjsip_options.c
res/res_pjsip/pjsip_outbound_auth.c