mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-02 10:22:46 +00:00
Merge "res_pjsip_outbound_publishing: After unloading the library won't load again" into 13
This commit is contained in:
@@ -1228,6 +1228,7 @@ static int load_module(void)
|
||||
|
||||
if (ast_sorcery_object_register(ast_sip_get_sorcery(), "outbound-publish", sip_outbound_publish_alloc, NULL,
|
||||
sip_outbound_publish_apply)) {
|
||||
ast_log(LOG_ERROR, "Unable to register 'outbound-publish' type with sorcery\n");
|
||||
return AST_MODULE_LOAD_DECLINE;
|
||||
}
|
||||
|
||||
@@ -1300,6 +1301,7 @@ static int unload_module(void)
|
||||
"in the allowed time\n", unloading.count);
|
||||
} else {
|
||||
ast_verb(5, "All items successfully unpublished\n");
|
||||
ast_sorcery_object_unregister(ast_sip_get_sorcery(), "outbound-publish");
|
||||
}
|
||||
|
||||
return res;
|
||||
|
@@ -862,6 +862,7 @@ static int load_module(void)
|
||||
ast_sorcery_apply_default(ast_sip_get_sorcery(), "asterisk-publication", "config", "pjsip.conf,criteria=type=asterisk-publication");
|
||||
|
||||
if (ast_sorcery_object_register(ast_sip_get_sorcery(), "asterisk-publication", asterisk_publication_config_alloc, NULL, NULL)) {
|
||||
ast_log(LOG_ERROR, "Unable to register 'asterisk-publication' type with sorcery\n");
|
||||
return AST_MODULE_LOAD_DECLINE;
|
||||
}
|
||||
|
||||
@@ -919,6 +920,7 @@ static int unload_module(void)
|
||||
ast_sip_unregister_publish_handler(&asterisk_mwi_publication_handler);
|
||||
ast_sip_unregister_event_publisher_handler(&asterisk_devicestate_publisher_handler);
|
||||
ast_sip_unregister_event_publisher_handler(&asterisk_mwi_publisher_handler);
|
||||
ast_sorcery_object_unregister(ast_sip_get_sorcery(), "asterisk-publication");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user