]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
config_options: Display the see-also information for CLI config option help
authorMatthew Jordan <mjordan@digium.com>
Fri, 7 Mar 2014 21:53:17 +0000 (21:53 +0000)
committerMatthew Jordan <mjordan@digium.com>
Fri, 7 Mar 2014 21:53:17 +0000 (21:53 +0000)
The config option help information has always parsed the <see-also> tags in the
XML documentation. Unfortunately, it just never bothered displaying them on
the CLI. With this patch, when you execute 'config show help [module] [obj]
[option]', it will display what other options are useful to you.

(closes issue ASTERISK-22008)
Reported by: Richard Mudgett

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410209 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/config_options.c

index b6e0c812aa5eff3336931443756bbf3f5e04be8b..2ec68f6f427935aac5236199bfe81bfb1d25e812 100644 (file)
@@ -1194,6 +1194,11 @@ static void cli_show_module_options(struct ast_cli_args *a)
                                ast_cli(a->fd, "%s\n\n", ast_xmldoc_printable(ast_str_buffer(tmp->description), 1));
                        }
 
+                       if (ast_str_strlen(tmp->seealso)) {
+                               ast_cli(a->fd, "See Also:\n");
+                               ast_cli(a->fd, "%s\n\n", ast_xmldoc_printable(ast_str_buffer(tmp->seealso), 1));
+                       }
+
                        match = 1;
                }
        }