[asterisk-commits] file: branch 13 r431538 - /branches/13/main/sorcery.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Feb 3 18:58:38 CST 2015
Author: file
Date: Tue Feb 3 18:58:34 2015
New Revision: 431538
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=431538
Log:
sorcery: Don't try to load object types which haven't been defined.
The act of defining wizards for an object type in sorcery.conf will
create a minimal object type. This can cause a problem when a module
has multiple sorcery instances (which all get the wizards from sorcery.conf
applied) but the sorcery instances do not all contain full information
about the object types. Upon loading errors will occur stating that
the objects can not be created. This is confusing and is actually
perfectly fine.
This change makes it so that only object types which have been fully
defined will be loaded.
ASTERISK-24748 #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=431538&r1=431537&r2=431538
==============================================================================
--- branches/13/main/sorcery.c (original)
+++ branches/13/main/sorcery.c Tue Feb 3 18:58:34 2015
@@ -1247,6 +1247,10 @@
{
struct ast_sorcery_object_type *type = obj;
struct sorcery_load_details *details = arg;
+
+ if (!type->type.item_alloc) {
+ return 0;
+ }
details->type = type->name;
More information about the asterisk-commits
mailing list