mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 11:25:35 +00:00
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
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user