[asterisk-dev] [Code Review] Make ast_carefulwrite() ... be more careful

Russell Bryant russell at digium.com
Thu Dec 18 15:28:45 CST 2008


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

(Updated 2008-12-18 15:28:45.878427)


Review request for Asterisk Developers.


Changes
-------

Updated diff to address Mark's suggestions


Summary
-------

This patch was written to address some cases where users of the Asterisk Manager Interface could observe partial writes of messages.  In Asterisk 1.4, the function ast_carefulwrite() is used to write data to the socket.  While the function was sort of careful, it was not careful enough.  This patch addresses the following issues:

1) It did not previously handle an error of EINTR from write().
2) It did not handle EINTR or EGAIN errors from poll().


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


Diffs (updated)
-----

  /branches/1.4/main/utils.c 165794 

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


Testing
-------

I connected to the AMI, made sure I could still log in, and observed normal looking responses and events.


Thanks,

Russell




More information about the asterisk-dev mailing list