When converting this code to use the list macros, I changed it so objects are
commit283c2ab67aed4aa1dc08a4eff6ec5e24ef0539bb
authorrussell <russell@614ede4d-c843-0410-af14-a771ab80d22e>
Wed, 22 Aug 2007 22:40:27 +0000 (22 22:40 +0000)
committerrussell <russell@614ede4d-c843-0410-af14-a771ab80d22e>
Wed, 22 Aug 2007 22:40:27 +0000 (22 22:40 +0000)
tree872fbcecfd835a80f82f13e23a6e41975fa8c438
parent606e142696574d0f9aee55424d85984000b2033d
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: http://svn.digium.com/svn/asterisk/branches/1.4@80424 614ede4d-c843-0410-af14-a771ab80d22e
main/astobj2.c