res_pjsip/res_pjsip_mwi: use centralized serializer pools

Both res_pjsip and res_pjsip_mwi made use of serializer pools. However, they
both implemented their own serializer pool functionality that was pretty much
identical in each of the source files. This patch removes the duplicated code,
and uses the new 'ast_serializer_pool' object instead.

Additionally res_pjsip_mwi enables a shutdown group on the pool since if the
timing was right the module could be unloaded while taskprocessor threads still
needed to execute, thus causing a crash.

Change-Id: I959b0805ad024585bbb6276593118be34fbf6e1d
This commit is contained in:
Kevin Harwell
2019-10-02 12:56:14 -05:00
parent c0efe19cec
commit 2970a13fb8
3 changed files with 64 additions and 194 deletions

View File

@@ -2980,6 +2980,11 @@ const char *ast_sip_get_host_ip_string(int af);
*/
long ast_sip_threadpool_queue_size(void);
/*!
* \brief Retrieve the SIP threadpool object
*/
struct ast_threadpool *ast_sip_threadpool(void);
/*!
* \brief Retrieve transport state
* \since 13.7.1