]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_pjsip_exten_state,res_pjsip_mwi: Allow unload on shutdown
authorGeorge Joseph <gjoseph@sangoma.com>
Thu, 19 Oct 2023 13:40:26 +0000 (07:40 -0600)
committerAsterisk Development Team <asteriskteam@digium.com>
Fri, 12 Jan 2024 18:21:32 +0000 (18:21 +0000)
commitaadd2931630bbf00bc6c2e1ce35f1bc12c88f54a
tree17a05c930a933a093d8b9947b0f8e6d34b216fc7
parenteeea910890a3d87aea123a1b4f6acf6fc338293e
res_pjsip_exten_state,res_pjsip_mwi: Allow unload on shutdown

Commit f66f77f last year prevents the res_pjsip_exten_state and
res_pjsip_mwi modules from unloading due to possible pjproject
asserts if the modules are reloaded. A side effect of the
implementation is that the taskprocessors these modules use aren't
being released. When asterisk is doing a graceful shutdown, it
waits AST_TASKPROCESSOR_SHUTDOWN_MAX_WAIT seconds for all
taskprocessors to stop but since those 2 modules don't release
theirs, the shutdown hangs for that amount of time.

This change allows the modules to be unloaded and their resources to
be released when ast_shutdown_final is true.

Resolves: #379
(cherry picked from commit 3e4024ee206f3555b9ac961f0cd50ac0455c384a)
res/res_pjsip_exten_state.c
res/res_pjsip_mwi.c