mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 12:16:00 +00:00
res_prometheus: Optional load res_pjsip_outbound_registration.so
Switched res_pjsip_outbound_registration.so dep to optional. Added module loaded check before using it. ASTERISK-30101 #close Change-Id: Ia34f1684d984e821fbdd4de8911f930337703666
This commit is contained in:
committed by
Friendly Automation
parent
2619350741
commit
cd9b332118
@@ -974,8 +974,13 @@ static int load_module(void)
|
|||||||
if (cli_init()
|
if (cli_init()
|
||||||
|| channel_metrics_init()
|
|| channel_metrics_init()
|
||||||
|| endpoint_metrics_init()
|
|| endpoint_metrics_init()
|
||||||
|| bridge_metrics_init()
|
|| bridge_metrics_init()) {
|
||||||
|| pjsip_outbound_registration_metrics_init()) {
|
goto cleanup;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(ast_module_check("res_pjsip_outbound_registration.so")) {
|
||||||
|
/* Call a local function, used in the core prometheus code only */
|
||||||
|
if (pjsip_outbound_registration_metrics_init())
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1004,6 +1009,7 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_GLOBAL_SYMBOLS | AST_MODFLAG_LOAD_
|
|||||||
.load_pri = AST_MODPRI_DEFAULT,
|
.load_pri = AST_MODPRI_DEFAULT,
|
||||||
#ifdef HAVE_PJPROJECT
|
#ifdef HAVE_PJPROJECT
|
||||||
/* This module explicitly calls into res_pjsip if Asterisk is built with PJSIP support, so they are required. */
|
/* This module explicitly calls into res_pjsip if Asterisk is built with PJSIP support, so they are required. */
|
||||||
.requires = "res_pjsip,res_pjsip_outbound_registration",
|
.requires = "res_pjsip",
|
||||||
|
.optional_modules = "res_pjsip_outbound_registration",
|
||||||
#endif
|
#endif
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user