Merged revisions 80424 via svnmerge from
authorRussell Bryant <russell@russellbryant.com>
Wed, 22 Aug 2007 22:43:12 +0000 (22:43 +0000)
committerRussell Bryant <russell@russellbryant.com>
Wed, 22 Aug 2007 22:43:12 +0000 (22:43 +0000)
commit4328c7528104a61a11b02b6a05964a52fd57f480
treee948e8607893e4c0198ff4b1dd9cfbf1cf0c9205
parentf6f9c147233aed73ce37b90c29143f436558e4bd
Merged revisions 80424 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r80424 | russell | 2007-08-22 17:40:27 -0500 (Wed, 22 Aug 2007) | 10 lines

When converting this code to use the list macros, I changed it so objects are
added to the head of a bucket instead of the tail.  However, while looking over
code with mmichelson, we noticed that the algorithm used in ao2_iterator_next
requires that items are added to the tail.  This wouldn't have caused any huge
problem, but it wasn't correct.  It meant that if an object was added to a
container while you were iterating it, and it was added to the same bucket that
the current element is in, then the new object would be returned by
ao2_iterator_next, and any other objects in the bucket would be bypassed in
the traversal.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@80425 65c4cc65-6c06-0410-ace0-fbb531ad65f3
main/astobj2.c