aboutsummaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2006-06-12 15:30:32 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2006-06-12 15:30:32 +0000
commitc3c5710689246ab800983462b18ae888a9c41e9b (patch)
treec2c34414aeb0e5b0d264272561ab0adf88a21c71 /res
parent158add374c1369a9338720f6b3e6d370e87a05c7 (diff)
Merged revisions 33615 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r33615 | tilghman | 2006-06-12 10:27:18 -0500 (Mon, 12 Jun 2006) | 4 lines Move set priority up, because at this point in the code, stdout is no longer the console. If we're unable to set priority, the error goes to Asterisk as if it were an AGI command (issue 7335). ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@33616 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rw-r--r--res/res_agi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/res/res_agi.c b/res/res_agi.c
index 1d6cd9257..62ecea59b 100644
--- a/res/res_agi.c
+++ b/res/res_agi.c
@@ -305,6 +305,9 @@ static enum agi_result launch_script(char *script, char *argv[], int *fds, int *
setenv("AST_KEY_DIR", ast_config_AST_KEY_DIR, 1);
setenv("AST_RUN_DIR", ast_config_AST_RUN_DIR, 1);
+ /* Don't run AGI scripts with realtime priority -- it causes audio stutter */
+ ast_set_priority(0);
+
/* Redirect stdin and out, provide enhanced audio channel if desired */
dup2(fromast[0], STDIN_FILENO);
dup2(toast[1], STDOUT_FILENO);
@@ -324,9 +327,6 @@ static enum agi_result launch_script(char *script, char *argv[], int *fds, int *
for (x=STDERR_FILENO + 2;x<1024;x++)
close(x);
- /* Don't run AGI scripts with realtime priority -- it causes audio stutter */
- ast_set_priority(0);
-
/* Execute script */
execv(script, argv);
/* Can't use ast_log since FD's are closed */