diff options
author | Kevin Harwell <kharwell@digium.com> | 2016-05-03 15:35:24 -0500 |
---|---|---|
committer | Kevin Harwell <kharwell@digium.com> | 2016-05-11 11:41:21 -0500 |
commit | 10de553c9d6922ebf3959b4fd7b50a2fad629eb1 (patch) | |
tree | c8454079e0097e270e2a80d1f09d6b89c05be2f1 /res/res_pjsip_outbound_publish.c | |
parent | 81773ceb9cb03e11b9a39fb882dcc72815784566 (diff) |
res_pjsip_outbound_publishing: After unloading the library won't load again
The same thing was happening in res_pjsip_publish_asterisk. When the library
was unloaded it did not unregister the object type from sorcery. Subsequent
loads resulted in a failed load due to the sorcery type already existing.
Change-Id: Ifdc25e94e4cd40bc5a19eb4d0a00b86c2e9fedc9
Diffstat (limited to 'res/res_pjsip_outbound_publish.c')
-rw-r--r-- | res/res_pjsip_outbound_publish.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/res/res_pjsip_outbound_publish.c b/res/res_pjsip_outbound_publish.c index 60f9bbb17..073a2d1ed 100644 --- a/res/res_pjsip_outbound_publish.c +++ b/res/res_pjsip_outbound_publish.c @@ -1141,6 +1141,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; } @@ -1213,6 +1214,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; |