diff options
author | Joshua Colp <jcolp@digium.com> | 2015-02-14 19:46:09 +0000 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2015-02-14 19:46:09 +0000 |
commit | 455a98a2f88dbc3fb0ca7273f856e59dae969749 (patch) | |
tree | 45d345508b329aac50e797cf7bbecc0022597bc3 | |
parent | fae6bf8acef7f45fc168080c2d32bee79f0891f0 (diff) |
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
........
Merged revisions 431771 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@431772 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r-- | main/sorcery.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/main/sorcery.c b/main/sorcery.c index 17d262595..cec3f1b39 100644 --- a/main/sorcery.c +++ b/main/sorcery.c @@ -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; } |