summaryrefslogtreecommitdiff
path: root/main/pbx.c
diff options
context:
space:
mode:
authorMatthew Nicholson <mnicholson@digium.com>2011-10-10 14:16:27 +0000
committerMatthew Nicholson <mnicholson@digium.com>2011-10-10 14:16:27 +0000
commitbb07ca66a174bdf92bbdfcc4f58c9065c90b3af3 (patch)
tree51dd35a6ca2c2285c9414e4bcec538b835fc0ddc /main/pbx.c
parent7cb2ac866495b44b5525fc34650478114f40182e (diff)
Merged revisions 340109 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r340109 | mnicholson | 2011-10-10 09:15:41 -0500 (Mon, 10 Oct 2011) | 18 lines Merged revisions 340108 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r340108 | mnicholson | 2011-10-10 09:14:48 -0500 (Mon, 10 Oct 2011) | 11 lines Load the proper XML documentation when multiple modules document the same application. This patch adds an optional "module" attribute to the XML documentation spec that allows the documentation processor to match apps with identical names from different modules to their documentation. This patch also fixes a number of bugs with the documentation processor and should make it a little more efficient. Support for multiple languages has also been properly implemented. ASTERISK-18130 Review: https://reviewboard.asterisk.org/r/1485/ ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@340110 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/pbx.c')
-rw-r--r--main/pbx.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/main/pbx.c b/main/pbx.c
index 0e528fd4f..a10293d77 100644
--- a/main/pbx.c
+++ b/main/pbx.c
@@ -3552,27 +3552,27 @@ static int acf_retrieve_docs(struct ast_custom_function *acf)
}
/* load synopsis */
- tmpxml = ast_xmldoc_build_synopsis("function", acf->name);
+ tmpxml = ast_xmldoc_build_synopsis("function", acf->name, ast_module_name(acf->mod));
ast_string_field_set(acf, synopsis, tmpxml);
ast_free(tmpxml);
/* load description */
- tmpxml = ast_xmldoc_build_description("function", acf->name);
+ tmpxml = ast_xmldoc_build_description("function", acf->name, ast_module_name(acf->mod));
ast_string_field_set(acf, desc, tmpxml);
ast_free(tmpxml);
/* load syntax */
- tmpxml = ast_xmldoc_build_syntax("function", acf->name);
+ tmpxml = ast_xmldoc_build_syntax("function", acf->name, ast_module_name(acf->mod));
ast_string_field_set(acf, syntax, tmpxml);
ast_free(tmpxml);
/* load arguments */
- tmpxml = ast_xmldoc_build_arguments("function", acf->name);
+ tmpxml = ast_xmldoc_build_arguments("function", acf->name, ast_module_name(acf->mod));
ast_string_field_set(acf, arguments, tmpxml);
ast_free(tmpxml);
/* load seealso */
- tmpxml = ast_xmldoc_build_seealso("function", acf->name);
+ tmpxml = ast_xmldoc_build_seealso("function", acf->name, ast_module_name(acf->mod));
ast_string_field_set(acf, seealso, tmpxml);
ast_free(tmpxml);
@@ -5842,31 +5842,35 @@ int ast_register_application2(const char *app, int (*execute)(struct ast_channel
return -1;
}
+ strcpy(tmp->name, app);
+ tmp->execute = execute;
+ tmp->module = mod;
+
#ifdef AST_XML_DOCS
/* Try to lookup the docs in our XML documentation database */
if (ast_strlen_zero(synopsis) && ast_strlen_zero(description)) {
/* load synopsis */
- tmpxml = ast_xmldoc_build_synopsis("application", app);
+ tmpxml = ast_xmldoc_build_synopsis("application", app, ast_module_name(tmp->module));
ast_string_field_set(tmp, synopsis, tmpxml);
ast_free(tmpxml);
/* load description */
- tmpxml = ast_xmldoc_build_description("application", app);
+ tmpxml = ast_xmldoc_build_description("application", app, ast_module_name(tmp->module));
ast_string_field_set(tmp, description, tmpxml);
ast_free(tmpxml);
/* load syntax */
- tmpxml = ast_xmldoc_build_syntax("application", app);
+ tmpxml = ast_xmldoc_build_syntax("application", app, ast_module_name(tmp->module));
ast_string_field_set(tmp, syntax, tmpxml);
ast_free(tmpxml);
/* load arguments */
- tmpxml = ast_xmldoc_build_arguments("application", app);
+ tmpxml = ast_xmldoc_build_arguments("application", app, ast_module_name(tmp->module));
ast_string_field_set(tmp, arguments, tmpxml);
ast_free(tmpxml);
/* load seealso */
- tmpxml = ast_xmldoc_build_seealso("application", app);
+ tmpxml = ast_xmldoc_build_seealso("application", app, ast_module_name(tmp->module));
ast_string_field_set(tmp, seealso, tmpxml);
ast_free(tmpxml);
tmp->docsrc = AST_XML_DOC;
@@ -5879,10 +5883,6 @@ int ast_register_application2(const char *app, int (*execute)(struct ast_channel
}
#endif
- strcpy(tmp->name, app);
- tmp->execute = execute;
- tmp->module = mod;
-
/* Store in alphabetical order */
AST_RWLIST_TRAVERSE_SAFE_BEGIN(&apps, cur, list) {
if (strcasecmp(tmp->name, cur->name) < 0) {