diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-06-12 15:27:18 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-06-12 15:27:18 +0000 |
commit | a650a064528da55812a05f904601b7ecad5dc738 (patch) | |
tree | 183eb2e95adff5f73c4ef6cf6db14e28ef14a6b5 /res | |
parent | ed44d366e533d67a828578872658f78a449c45ee (diff) |
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/branches/1.2@33615 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rw-r--r-- | res/res_agi.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/res/res_agi.c b/res/res_agi.c index ddfabb357..5d2a029e1 100644 --- a/res/res_agi.c +++ b/res/res_agi.c @@ -282,6 +282,9 @@ static int launch_script(char *script, char *argv[], int *fds, int *efd, int *op return -1; } if (!pid) { + /* 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); @@ -301,9 +304,6 @@ static int launch_script(char *script, char *argv[], int *fds, int *efd, int *op 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 */ |