aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_agi.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-01-01 00:26:11 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-01-01 00:26:11 +0000
commit21c5f2a514f8e32d03855ecfab69227cbba3269d (patch)
tree8953ecf5cea049a12efa736bfc82a72b0029a2c3 /apps/app_agi.c
parent44d44bd08e9f0109c5e8ebb1171f02c2ba659925 (diff)
Don't close audio[0] if you're not careful
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1887 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_agi.c')
-rwxr-xr-xapps/app_agi.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/app_agi.c b/apps/app_agi.c
index 2dc6981d4..39ac20a0a 100755
--- a/apps/app_agi.c
+++ b/apps/app_agi.c
@@ -168,8 +168,10 @@ static int launch_script(char *script, char *args, int *fds, int *efd, int *opid
close(toast[1]);
close(fromast[0]);
- // [PHM 12/18/03]
- close(audio[0]);
+ if (efd) {
+ // [PHM 12/18/03]
+ close(audio[0]);
+ }
*opid = pid;
return 0;