diff options
Diffstat (limited to 'res')
-rw-r--r-- | res/res_corosync.c | 6 | ||||
-rw-r--r-- | res/res_pjsip_publish_asterisk.c | 5 | ||||
-rw-r--r-- | res/res_xmpp.c | 4 |
3 files changed, 15 insertions, 0 deletions
diff --git a/res/res_corosync.c b/res/res_corosync.c index 675bb3307..dbb884697 100644 --- a/res/res_corosync.c +++ b/res/res_corosync.c @@ -1103,6 +1103,11 @@ static int load_module(void) cs_error_t cs_err; struct cpg_name name; + if (ast_eid_is_empty(&ast_eid_default)) { + ast_log(LOG_ERROR, "Entity ID is not set.\n"); + return AST_MODULE_LOAD_DECLINE; + } + nodes = ao2_container_alloc(23, corosync_node_hash_fn, corosync_node_cmp_fn); if (!nodes) { goto failed; @@ -1162,6 +1167,7 @@ static int load_module(void) ast_cli_register_multiple(corosync_cli, ARRAY_LEN(corosync_cli)); + return AST_MODULE_LOAD_SUCCESS; failed: diff --git a/res/res_pjsip_publish_asterisk.c b/res/res_pjsip_publish_asterisk.c index 002d976d4..b32408aa3 100644 --- a/res/res_pjsip_publish_asterisk.c +++ b/res/res_pjsip_publish_asterisk.c @@ -858,6 +858,11 @@ static int load_module(void) { CHECK_PJSIP_PUBSUB_MODULE_LOADED(); + if (ast_eid_is_empty(&ast_eid_default)) { + ast_log(LOG_ERROR, "Entity ID is not set.\n"); + return AST_MODULE_LOAD_DECLINE; + } + ast_sorcery_apply_config(ast_sip_get_sorcery(), "asterisk-publication"); ast_sorcery_apply_default(ast_sip_get_sorcery(), "asterisk-publication", "config", "pjsip.conf,criteria=type=asterisk-publication"); diff --git a/res/res_xmpp.c b/res/res_xmpp.c index 67e479d86..c2b779628 100644 --- a/res/res_xmpp.c +++ b/res/res_xmpp.c @@ -4652,6 +4652,10 @@ static int load_module(void) ast_mutex_init(&messagelock); ast_cond_init(&message_received_condition, NULL); + if (ast_eid_is_empty(&ast_eid_default)) { + ast_log(LOG_WARNING, "Entity ID is not set. The distributing device state or MWI will not work.\n"); + } + return AST_MODULE_LOAD_SUCCESS; } |