Set append flag properly

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1649 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.0
Mark Spencer 22 years ago
parent a6b382fa40
commit ff6e7df51a

@ -515,7 +515,7 @@ static int handle_recordfile(struct ast_channel *chan, AGI *agi, int argc, char
if (!res) if (!res)
res = ast_waitstream(chan, argv[4]); res = ast_waitstream(chan, argv[4]);
if (!res) { 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) { if (!fs) {
res = -1; res = -1;
fdprintf(agi->fd, "200 result=%d (writefile)\n", res); fdprintf(agi->fd, "200 result=%d (writefile)\n", res);

Loading…
Cancel
Save