sorcery: Output an error message if a wizard is specified for an object type and it isn't found.

ASTERISK-24612 #close
Reported by: Joshua Colp


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431771 65c4cc65-6c06-0410-ace0-fbb531ad65f3
changes/43/43/1
Joshua Colp 10 years ago
parent 8c6e3ad3b4
commit 758a897876

@ -892,7 +892,11 @@ enum ast_sorcery_apply_result __ast_sorcery_apply_wizard_mapping(struct ast_sorc
RAII_VAR(struct ast_sorcery_object_wizard *, object_wizard, ao2_alloc(sizeof(*object_wizard), sorcery_object_wizard_destructor), ao2_cleanup);
int created = 0;
if (!wizard || !object_wizard) {
if (!wizard) {
ast_log(LOG_ERROR, "Wizard '%s' could not be applied to object type '%s' as it was not found\n",
name, type);
return AST_SORCERY_APPLY_FAIL;
} else if (!object_wizard) {
return AST_SORCERY_APPLY_FAIL;
}

Loading…
Cancel
Save