[asterisk-commits] file: trunk r232510 - in /trunk: CHANGES doc/asterisk.sgml main/asterisk.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Dec 2 14:10:11 CST 2009
Author: file
Date: Wed Dec 2 14:10:07 2009
New Revision: 232510
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=232510
Log:
Add an 'X' option to the asterisk application which enables #exec for configuration files.
This option can be used to enable #exec support in the asterisk.conf configuration file.
(closes issue #16260)
Reported by: atis
Patches:
exec_includes.patch uploaded by atis (license 242)
Modified:
trunk/CHANGES
trunk/doc/asterisk.sgml
trunk/main/asterisk.c
Modified: trunk/CHANGES
URL: http://svnview.digium.com/svn/asterisk/trunk/CHANGES?view=diff&rev=232510&r1=232509&r2=232510
==============================================================================
--- trunk/CHANGES (original)
+++ trunk/CHANGES Wed Dec 2 14:10:07 2009
@@ -344,7 +344,9 @@
* Modules.conf has a new option - "require" - that marks a module as critical for
the execution of Asterisk.
If one of the required modules fail to load, Asterisk will exit with a return
- code set to 2.
+ code set to 2.
+ * An 'X' option has been added to the asterisk application which enables #exec support.
+ This allows #exec to be used in asterisk.conf.
------------------------------------------------------------------------------
--- Functionality changes from Asterisk 1.6.1 to Asterisk 1.6.2 -------------
Modified: trunk/doc/asterisk.sgml
URL: http://svnview.digium.com/svn/asterisk/trunk/doc/asterisk.sgml?view=diff&rev=232510&r1=232509&r2=232510
==============================================================================
--- trunk/doc/asterisk.sgml (original)
+++ trunk/doc/asterisk.sgml Wed Dec 2 14:10:07 2009
@@ -310,6 +310,16 @@
</para>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term>-X</term>
+ <listitem>
+ <para>
+ Enables executing of includes via <command>#exec</command> directive.
+ This can be useful if You want to do <command>#exec</command> inside
+ <filename>asterisk.conf</filename>
+ </para>
+ </listitem>
+ </varlistentry>
</variablelist>
</refsect1>
<refsect1>
Modified: trunk/main/asterisk.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/asterisk.c?view=diff&rev=232510&r1=232509&r2=232510
==============================================================================
--- trunk/main/asterisk.c (original)
+++ trunk/main/asterisk.c Wed Dec 2 14:10:07 2009
@@ -2777,6 +2777,7 @@
printf(" of output to the CLI\n");
printf(" -v Increase verbosity (multiple v's = more verbose)\n");
printf(" -x <cmd> Execute command <cmd> (only valid with -r)\n");
+ printf(" -X Execute includes by default (allows #exec in asterisk.conf)\n");
printf(" -W Adjust terminal colors to compensate for a light background\n");
printf("\n");
return 0;
@@ -3141,7 +3142,7 @@
if (getenv("HOME"))
snprintf(filename, sizeof(filename), "%s/.asterisk_history", getenv("HOME"));
/* Check for options */
- while ((c = getopt(argc, argv, "BC:cde:FfG:ghIiL:M:mnpqRrs:TtU:VvWx:")) != -1) {
+ while ((c = getopt(argc, argv, "BC:cde:FfG:ghIiL:M:mnpqRrs:TtU:VvWXx:")) != -1) {
/*!\note Please keep the ordering here to alphabetical, capital letters
* first. This will make it easier in the future to select unused
* option flags for new features. */
@@ -3149,6 +3150,9 @@
case 'B': /* Force black background */
ast_set_flag(&ast_options, AST_OPT_FLAG_FORCE_BLACK_BACKGROUND);
ast_clear_flag(&ast_options, AST_OPT_FLAG_LIGHT_BACKGROUND);
+ break;
+ case 'X':
+ ast_set_flag(&ast_options, AST_OPT_FLAG_EXEC_INCLUDES);
break;
case 'C':
ast_copy_string(cfg_paths.config_file, optarg, sizeof(cfg_paths.config_file));
More information about the asterisk-commits
mailing list