summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2016-05-11 12:57:24 -0500
committerGerrit Code Review <gerrit2@gerrit.digium.api>2016-05-11 12:57:24 -0500
commit086e311a757ad749ce1fe0946eef33304ce03a3c (patch)
tree73dcabcfb5b363598ee159b4439df545dcfdd36b /res
parent0863ccee09fe59fce425c935078161f9c4e10bda (diff)
parentadc82a2260382383bfb6593adfaa8b8b7ef7d7d8 (diff)
Merge "res_pjsip_outbound_publishing: After unloading the library won't load again"
Diffstat (limited to 'res')
-rw-r--r--res/res_pjsip_outbound_publish.c2
-rw-r--r--res/res_pjsip_publish_asterisk.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/res/res_pjsip_outbound_publish.c b/res/res_pjsip_outbound_publish.c
index 0f0e290af..c08737bd6 100644
--- a/res/res_pjsip_outbound_publish.c
+++ b/res/res_pjsip_outbound_publish.c
@@ -1162,6 +1162,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;
}
@@ -1234,6 +1235,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;
diff --git a/res/res_pjsip_publish_asterisk.c b/res/res_pjsip_publish_asterisk.c
index 3218b0a0c..002d976d4 100644
--- a/res/res_pjsip_publish_asterisk.c
+++ b/res/res_pjsip_publish_asterisk.c
@@ -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;
}