[asterisk-dev] [Code Review] Introduce ast_careful_fwrite() to avoid partial writes for AMI in trunk/1.6

Russell Bryant russell at digium.com
Fri Dec 19 15:45:40 CST 2008


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.digium.com/r/104/
-----------------------------------------------------------

(Updated 2008-12-19 15:45:40.476373)


Review request for Asterisk Developers.


Changes
-------

Updated patch:

1) Removed fd argument from the new API call

2) Used ast_wait_for_output() before fflush()

3) Made sure that timeout argument provided to ast_wait_for_output() accounted for time elapsed


Summary
-------

This patch is very similar to the one for review 99.  This code has the same purpose as ast_carefulwrite(), except it is for writing to a file stream.  The common code between the two functions was broken out into a function, ast_wait_for_output().


This addresses bug 13546.
    http://bugs.digium.com/view.php?id=13546


Diffs (updated)
-----

  /trunk/include/asterisk/utils.h 166057 
  /trunk/main/manager.c 166057 
  /trunk/main/utils.c 166057 

Diff: http://reviewboard.digium.com/r/104/diff


Testing
-------

Connected to AMI, logged in, watched events


Thanks,

Russell




More information about the asterisk-dev mailing list