summaryrefslogtreecommitdiff
path: root/apps/app_agi.c
diff options
context:
space:
mode:
authorMark Spencer <markster@digium.com>2003-10-22 03:37:47 +0000
committerMark Spencer <markster@digium.com>2003-10-22 03:37:47 +0000
commitff6e7df51abb17ed9e0987a6d754ca1c3dbf24aa (patch)
treea0a96dfaa488c41e7bee74c1d9ed0c1f714e2e7c /apps/app_agi.c
parenta6b382fa40da25f720dccd22605cec50c3e115ba (diff)
Set append flag properly
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1649 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_agi.c')
-rwxr-xr-xapps/app_agi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/app_agi.c b/apps/app_agi.c
index 294b56bd3..4c4110fd0 100755
--- a/apps/app_agi.c
+++ b/apps/app_agi.c
@@ -515,7 +515,7 @@ static int handle_recordfile(struct ast_channel *chan, AGI *agi, int argc, char
if (!res)
res = ast_waitstream(chan, argv[4]);
if (!res) {
- fs = ast_writefile(argv[2], argv[3], NULL, O_CREAT | O_WRONLY, 0, 0644);
+ fs = ast_writefile(argv[2], argv[3], NULL, O_CREAT | O_WRONLY | (sample_offset ? O_APPEND : 0), 0, 0644);
if (!fs) {
res = -1;
fdprintf(agi->fd, "200 result=%d (writefile)\n", res);