[asterisk-commits] file: branch 13 r431771 - /branches/13/main/sorcery.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Feb 14 13:45:42 CST 2015


Author: file
Date: Sat Feb 14 13:45:40 2015
New Revision: 431771

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=431771
Log:
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

Modified:
    branches/13/main/sorcery.c

Modified: branches/13/main/sorcery.c
URL: http://svnview.digium.com/svn/asterisk/branches/13/main/sorcery.c?view=diff&rev=431771&r1=431770&r2=431771
==============================================================================
--- branches/13/main/sorcery.c (original)
+++ branches/13/main/sorcery.c Sat Feb 14 13:45:40 2015
@@ -892,7 +892,11 @@
 	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;
 	}
 




More information about the asterisk-commits mailing list