summaryrefslogtreecommitdiff
path: root/include/asterisk/sorcery.h
diff options
context:
space:
mode:
authorMatthew Jordan <mjordan@digium.com>2013-02-15 18:44:24 +0000
committerMatthew Jordan <mjordan@digium.com>2013-02-15 18:44:24 +0000
commite123ee2d77280e784d237dfc55740e96493819b7 (patch)
treedb775cdd19ea48c980705d5c79a91cdc03e2d738 /include/asterisk/sorcery.h
parent71bce17720d92ec286a2e85cdbc74545c7a4339f (diff)
Disable strict XML documentation config checking; fix crash caused by sorcery
This patch does two things: 1. It disables (temporarily) strict XML documentation checking for module configurations. We should re-enable it before making any release from trunk. 2. Pass the module flag AST_MODULE through sorcery. This means several of the API calls are now macros and will do this automatically for you. The config framework needs the module that objects are registering to so it can properly construct the documentation. (This was already a required field, but sorcery was getting by without it) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381567 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk/sorcery.h')
-rw-r--r--include/asterisk/sorcery.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/include/asterisk/sorcery.h b/include/asterisk/sorcery.h
index 6f3ec3a52..e5f727a7b 100644
--- a/include/asterisk/sorcery.h
+++ b/include/asterisk/sorcery.h
@@ -275,17 +275,22 @@ struct ast_sorcery *ast_sorcery_open(void);
*
* \param sorcery Pointer to a sorcery structure
* \param name Name of the category to use within the configuration file, normally the module name
+ * \param module The module name (AST_MODULE)
*
* \retval 0 success
* \retval -1 failure
*/
-int ast_sorcery_apply_config(struct ast_sorcery *sorcery, const char *name);
+int __ast_sorcery_apply_config(struct ast_sorcery *sorcery, const char *name, const char *module);
+
+#define ast_sorcery_apply_config(sorcery, name) \
+ __ast_sorcery_apply_config((sorcery), (name), AST_MODULE)
/*!
* \brief Apply default object wizard mappings
*
* \param sorcery Pointer to a sorcery structure
* \param type Type of object to apply to
+ * \param module The name of the module, typically AST_MODULE
* \param name Name of the wizard to use
* \param data Data to be passed to wizard
*
@@ -296,7 +301,10 @@ int ast_sorcery_apply_config(struct ast_sorcery *sorcery, const char *name);
*
* \note Only a single default can exist per object type
*/
-int ast_sorcery_apply_default(struct ast_sorcery *sorcery, const char *type, const char *name, const char *data);
+int __ast_sorcery_apply_default(struct ast_sorcery *sorcery, const char *type, const char *module, const char *name, const char *data);
+
+#define ast_sorcery_apply_default(sorcery, type, name, data) \
+ __ast_sorcery_apply_default((sorcery), (type), AST_MODULE, (name), (data))
/*!
* \brief Register an object type