[asterisk-dev] [Code Review] Add global ao2 array container.

Mark Michelson reviewboard at asterisk.org
Thu Mar 22 14:37:45 CDT 2012


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1824/#review5860
-----------------------------------------------------------

Ship it!


Looks good! I just have one documentation-related change to recommend and then this is good to go.


/trunk/include/asterisk/astobj2.h
<https://reviewboard.asterisk.org/r/1824/#comment10706>

    I would add some mention here that the object being placed into the global array has its refcount increased by one. This way there is no confusion about whether the array "inherits" the reference that the calling function already had.


- Mark


On March 21, 2012, 4:37 p.m., rmudgett wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1824/
> -----------------------------------------------------------
> 
> (Updated March 21, 2012, 4:37 p.m.)
> 
> 
> Review request for Asterisk Developers and Matt Jordan.
> 
> 
> Summary
> -------
> 
> Global ao2 objects must always exist after initialization because there is no access control to obtain another reference to the global object.
> 
> It is anticipated that the Asterisk 11 Configuration Management project could use these new API calls to replace an active configuration parameter object with an updated configuration parameter object.
> 
> With these new API calls, the global object could be replaced, removed, or referenced without the risk of someone using a stale global object pointer.
> 
> 
> Diffs
> -----
> 
>   /trunk/include/asterisk/astobj2.h 360189 
>   /trunk/main/astobj2.c 360189 
>   /trunk/tests/test_astobj2.c 360189 
> 
> Diff: https://reviewboard.asterisk.org/r/1824/diff
> 
> 
> Testing
> -------
> 
> Added a new unit test to exercise the new API calls.  They pass.
> 
> 
> Thanks,
> 
> rmudgett
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20120322/68cebe73/attachment.htm>


More information about the asterisk-dev mailing list