Prevent duplicate sorcery wizards from being applied to sorcery object types.

This commit contains several changes to sorcery:

1) Application of sorcery configuration based on module name is automatically performed
when sorcery is opened for a module.
2) Sorcery will not attempt to apply the same wizard to an object type more than once.
3) Sorcery gives more exact results when attempting to apply a wizard, whether as the
default or based on configuration.

Sorcery unit tests still pass for me after making these changes.

Review: https://reviewboard.asterisk.org/r/3326
........

Merged revisions 411159 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@411656 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Michelson
2014-04-02 18:57:29 +00:00
parent c704795dcb
commit eefcb79bfb
10 changed files with 100 additions and 54 deletions

View File

@@ -117,8 +117,6 @@ int ast_sip_initialize_system(void)
return -1;
}
ast_sorcery_apply_config(system_sorcery, "res_pjsip");
ast_sorcery_apply_default(system_sorcery, "system", "config", "pjsip.conf,criteria=type=system");
if (ast_sorcery_object_register_no_reload(system_sorcery, "system", system_alloc, NULL, system_apply)) {

View File

@@ -1619,8 +1619,6 @@ int ast_res_pjsip_initialize_configuration(const struct ast_module_info *ast_mod
return -1;
}
ast_sorcery_apply_config(sip_sorcery, "res_pjsip");
ast_sip_initialize_cli();
if (ast_sip_initialize_sorcery_auth()) {