[asterisk-commits] trunk - r8372 /trunk/res/res_agi.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Fri Jan 20 22:22:19 MST 2006
Author: tilghman
Date: Fri Jan 20 23:22:18 2006
New Revision: 8372
URL: http://svn.digium.com/view/asterisk?rev=8372&view=rev
Log:
Bug 4872 - Make Asterisk paths available to AGIs via environmental variables
Modified:
trunk/res/res_agi.c
Modified: trunk/res/res_agi.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_agi.c?rev=8372&r1=8371&r2=8372&view=diff
==============================================================================
--- trunk/res/res_agi.c (original)
+++ trunk/res/res_agi.c Fri Jan 20 23:22:18 2006
@@ -272,6 +272,18 @@
return -1;
}
if (!pid) {
+ /* Pass paths to AGI via environmental variables */
+ setenv("AST_CONFIG_DIR", ast_config_AST_CONFIG_DIR, 1);
+ setenv("AST_CONFIG_FILE", ast_config_AST_CONFIG_FILE, 1);
+ setenv("AST_MODULE_DIR", ast_config_AST_MODULE_DIR, 1);
+ setenv("AST_SPOOL_DIR", ast_config_AST_SPOOL_DIR, 1);
+ setenv("AST_MONITOR_DIR", ast_config_AST_MONITOR_DIR, 1);
+ setenv("AST_VAR_DIR", ast_config_AST_VAR_DIR, 1);
+ setenv("AST_LOG_DIR", ast_config_AST_LOG_DIR, 1);
+ setenv("AST_AGI_DIR", ast_config_AST_AGI_DIR, 1);
+ setenv("AST_KEY_DIR", ast_config_AST_KEY_DIR, 1);
+ setenv("AST_RUN_DIR", ast_config_AST_RUN_DIR, 1);
+
/* Redirect stdin and out, provide enhanced audio channel if desired */
dup2(fromast[0], STDIN_FILENO);
dup2(toast[1], STDOUT_FILENO);
More information about the asterisk-commits
mailing list