[Home]

Summary:ASTERISK-03158: [PATCH] ASTOBJ_CONTAINER_TRAVERSE doesn't allow early exit
Reporter:Kevin P. Fleming (kpfleming)Labels:
Date Opened:2005-01-02 09:36:35.000-0600Date Closed:2008-01-15 15:19:42.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) astobj_traverse_opt_rev1.diff.txt
Description:The ASTOBJ_CONTAINER_TRAVERSE macro has no way to reliably allow the "eval" block to exit from the traversal before the end of the list. The previous open-coded traversals could just use "break;", but since the eval block is frequently a do-while block itself, break does not exit from the outer while loop in TRAVERSE.

The patch adds a "continue" parameter to ASTOBJ_CONTAINER_TRAVERSE, which is a condition to be checked before executing another cycle of the loop.

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

Disclaimer is on file.
Comments:By: Mark Spencer (markster) 2005-01-04 00:10:52.000-0600

Added to CVS, thanks!

By: Digium Subversion (svnbot) 2008-01-15 15:19:42.000-0600

Repository: asterisk
Revision: 4655

U   trunk/channels/chan_sip.c
U   trunk/include/asterisk/astobj.h

------------------------------------------------------------------------
r4655 | markster | 2008-01-15 15:19:42 -0600 (Tue, 15 Jan 2008) | 2 lines

Allow early exit from traverse (bug ASTERISK-3158)

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

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