Introduce ast_careful_fwrite() and use in AMI to prevent partial writes.
authorRussell Bryant <russell@russellbryant.com>
Mon, 22 Dec 2008 17:09:36 +0000 (17:09 +0000)
committerRussell Bryant <russell@russellbryant.com>
Mon, 22 Dec 2008 17:09:36 +0000 (17:09 +0000)
commitc2999a8366b0738f14b2d4493cda496ff65bcc09
tree97efdb1323ea8cb3038a987daaded8806e5b4213
parent77b1fe0cebbecbbf104f4ed5b3b81fbd0d8bce7c
Introduce ast_careful_fwrite() and use in AMI to prevent partial writes.

This patch introduces a function to do careful writes on a file stream which
will handle timeouts and partial writes.  It is currently used in AMI to
address the issue that has been reported.  However, there are probably a few
other places where this could be used.

(closes issue #13546)
Reported by: srt
Tested by: russell
http://reviewboard.digium.com/r/104/

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@166282 65c4cc65-6c06-0410-ace0-fbb531ad65f3
include/asterisk/utils.h
main/manager.c
main/utils.c