On 16.09.10 15:39, Stefan Sayer wrote:
Hi,
Самусенко Андрей wrote:
AnswerMachine.cpp: a_msg.open(msg_fn_tmp,AmAudioFile::Write,true)
create tmp file.
where did you find this code? in master and 1.2 I don't find it, the
msg_filename is with extension (and this code has been in production
for years without filling up tmp dir).
The code in place is slightly different, but functionnally identical.
In fact, it does not fill up anything. It is just one unnecessary call
to unlink(), which does not hurt so much.
The other way would be to create the file for real (thus removing the
last argument while calling AmAudioFile::open()), and unlinking afterwards.
-Raphael.
Stefan
Real file name generated by tmpfile(). It is enough to pass
"."+AnswerMachineFactory::RecFileExt in the 1st argument .
Later unlink(msg_fn_tmp.c_str()) should "return" ENOENT, but i had
not checked. If did not remove other file.
_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev
_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev