mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
PJSIP: Enforce module load dependencies
This enforces that res_pjsip, res_pjsip_session, and res_pjsip_pubsub have loaded properly before attempting to load any modules that depend on them since the module loader system is not currently capable of resolving module dependencies on its own. ASTERISK-24312 #close Reported by: Dafi Ni Review: https://reviewboard.asterisk.org/r/4062/ ........ Merged revisions 425690 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 425691 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425700 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -4168,7 +4168,11 @@ static int resource_event_handler(const struct aco_option *opt, struct ast_varia
|
||||
static int load_module(void)
|
||||
{
|
||||
static const pj_str_t str_PUBLISH = { "PUBLISH", 7 };
|
||||
struct ast_sorcery *sorcery = ast_sip_get_sorcery();
|
||||
struct ast_sorcery *sorcery;
|
||||
|
||||
CHECK_PJSIP_MODULE_LOADED();
|
||||
|
||||
sorcery = ast_sip_get_sorcery();
|
||||
|
||||
pjsip_evsub_init_module(ast_sip_get_pjsip_endpoint());
|
||||
|
||||
|
Reference in New Issue
Block a user