git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@42169
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
exit 1; \
fi; \
done
- for x in sounds/demo-* sounds/vm-* sounds/transfer* sounds/pbx-* sounds/ss-* sounds/beep* sounds/dir-* sounds/conf-* sounds/agent-* sounds/invalid* sounds/tt-* sounds/auth-* sounds/privacy-* sounds/queue-* sounds/spy-* sounds/priv-* sounds/screen-* sounds/hello-*; do \
+ for x in sounds/demo-* sounds/vm-* sounds/transfer* sounds/pbx-* sounds/ss-* sounds/beep* sounds/dir-* sounds/conf-* sounds/agent-* sounds/invalid* sounds/tt-* sounds/auth-* sounds/privacy-* sounds/queue-* sounds/spy-* sounds/priv-* sounds/screen-* sounds/hello-* sounds/hours* sounds/minute* sounds/second* ; do \
if $(GREP) -q "^%`basename $$x`%" sounds.txt; then \
$(INSTALL) -m 644 $$x $(DESTDIR)$(ASTVARLIBDIR)/sounds ; \
else \
agi.ctrl = fds[0];
agi.audio = efd;
res = run_agi(chan, argv[0], &agi, pid, dead);
- close(fds[1]);
+ if (fds[1] != fds[0])
+ close(fds[1]);
if (efd > -1)
close(efd);
}