Review Board 1.7.16

Add ability to clone ao2 containers.

Review Request #1746 - Created Feb. 15, 2012 and submitted

Occasionally there is a need to put all objects in one container also into another container.

Some reasons you might need to do this:
1) You need to reconfigure a container.   You would do this by creating a new container with the new configuration and ao2_container_dup the old container into it.  Then replace the old container with the new.  Then destroy the old container.

2) You need the contents of a container to remain stable while operating on all of the objects.  You would do this by creating a cloned container of the original with ao2_container_clone.  The cloned container is a snapshot of the objects at the time of the cloning.  When done, just destroy the cloned container.
Added unit testing code to test the new ao2_container_clone and ao2_container_dup functions.

Tests still pass.
Review request changed
Updated (Feb. 24, 2012, 1:08 p.m.)
Address Kevin's comments.
Ship it!
Posted (Feb. 27, 2012, 4:12 a.m.)
Looks good!
/trunk/include/asterisk/astobj2.h (Diff revision 4)
nit: "will be left empty" runs on a server provided by Digium, Inc. and uses bandwidth donated to the open source Asterisk community by API Digital Communications in Huntsville, AL USA.
Please report problems with this site to