[Home]

Summary:ASTERISK-05120: [patch] Invalid ast_verbose logged messages longer than 4K
Reporter:klictel (klictel)Labels:
Date Opened:2005-09-21 09:53:34Date Closed:2008-01-15 15:49:16.000-0600
Priority:TrivialRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 5263.patch.txt
( 1) logger.patch
Description:When logging a message that has a length greater than 4K, which is the size of the buffer stuff in ast_verbose, ast_verbose truncates the messages to 4K and never resets the pos variable. And all subsequent logging using ast_verbose will log the same message that had been truncated over and over. The fix is to verify whethere pos reached the end of the buffer and log it and reset the index 'pos' on the 'stuff' buffer.

****** ADDITIONAL INFORMATION ******

Detected and patched in 1.2beta1, but also present in CVS HEAD
Comments:By: Mark Spencer (markster) 2005-09-25 00:08:01

This patch doesn't apply to CVS head, can you supply a patch for CVS head?  Thanks!

By: Michael Jerris (mikej) 2005-09-25 22:09:31

Uploaded updated patch for cvs HEAD.

By: klictel (klictel) 2005-09-26 08:47:13

Thanks for the patch MikeJ. Appreciated.

By: Kevin P. Fleming (kpfleming) 2005-09-26 11:47:03

Fixed in CVS HEAD... the supplied patch did apply, but did not compile, because there were variable name changes recently in that function. In addition, it was not quite in sync with the formatting guidelines :-(

By: Digium Subversion (svnbot) 2008-01-15 15:49:16.000-0600

Repository: asterisk
Revision: 6662

U   trunk/logger.c

------------------------------------------------------------------------
r6662 | kpfleming | 2008-01-15 15:49:15 -0600 (Tue, 15 Jan 2008) | 2 lines

ensure that if the verbose buffer is full, we send it out even if it's not complete (issue ASTERISK-5120, patch modified to actually compile)

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

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