[asterisk-bugs] [Asterisk 0013546]: Partial writes on Manager API

Asterisk Bug Tracker noreply at bugs.digium.com
Mon Dec 22 11:19:02 CST 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=13546 
====================================================================== 
Reported By:                srt
Assigned To:                russell
====================================================================== 
Project:                    Asterisk
Issue ID:                   13546
Category:                   Core/ManagerInterface
Reproducibility:            random
Severity:                   minor
Priority:                   normal
Status:                     closed
Asterisk Version:           1.4.21.2 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             2008-09-23 08:35 CDT
Last Modified:              2008-12-22 11:19 CST
====================================================================== 
Summary:                    Partial writes on Manager API
Description: 
Sometimes writing manager events with ast_carefulwrite in manager.c only
results in a partial write i.e. not all data is written to the socket.
There is no check for this and no code to send the missing data. As a
workaround increasing the writetimeout in manager.conf mitigates this
issue.
See
http://jira.reucon.org/browse/AJ-174?focusedCommentId=10522#action_10522
for details.
====================================================================== 

---------------------------------------------------------------------- 
 (0096815) svnbot (reporter) - 2008-12-22 11:19
 http://bugs.digium.com/view.php?id=13546#c96815 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 166284

_U  branches/1.6.1/
U   branches/1.6.1/include/asterisk/utils.h
U   branches/1.6.1/main/manager.c
U   branches/1.6.1/main/utils.c

------------------------------------------------------------------------
r166284 | russell | 2008-12-22 11:19:01 -0600 (Mon, 22 Dec 2008) | 20
lines

Merged revisions 166282 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
r166282 | russell | 2008-12-22 11:09:36 -0600 (Mon, 22 Dec 2008) | 12
lines

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 http://bugs.digium.com/view.php?id=13546)
Reported by: srt
Tested by: russell
http://reviewboard.digium.com/r/104/

........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=166284 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-12-22 11:19 svnbot         Checkin                                      
2008-12-22 11:19 svnbot         Note Added: 0096815                          
======================================================================




More information about the asterisk-bugs mailing list