[asterisk-dev] [Code Review] Add ability to pass arbitrary data to ao2 callbacks

Russell Bryant russell at digium.com
Fri Nov 7 08:24:07 CST 2008


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.digium.com/r/36/#review96
-----------------------------------------------------------



/trunk/include/asterisk/astobj2.h
<http://reviewboard.digium.com/r/36/#comment177>

    I think the same thing should be done for ao2_find()


- Russell


On 2008-11-06 19:04:23, Sean Bright wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.digium.com/r/36/
> -----------------------------------------------------------
> 
> (Updated 2008-11-06 19:04:23)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> When going through the nested function cleanup, we came across a situation where we needed to pass an arbitrary data structure an ao2 callback where OBJ_POINTER was being passed (meaning that the passed 'arg' had to be hashable).  There are a couple of hacky ways around this, but a few of us (russell, mark m. and kevin) thought it would be better to add another argument to ao2_callback.  This patch *starts* that process, the names and faces will probably change, but I just wanted to get something up here as a starting point.
> 
> 
> Diffs
> -----
> 
>   /trunk/apps/app_queue.c 155164 
>   /trunk/channels/chan_console.c 155164 
>   /trunk/channels/chan_iax2.c 155164 
>   /trunk/channels/chan_sip.c 155164 
>   /trunk/funcs/func_dialgroup.c 155164 
>   /trunk/include/asterisk/astobj2.h 155164 
>   /trunk/main/astobj2.c 155164 
>   /trunk/main/config.c 155164 
>   /trunk/main/features.c 155164 
>   /trunk/main/manager.c 155164 
>   /trunk/main/taskprocessor.c 155164 
>   /trunk/res/res_phoneprov.c 155164 
>   /trunk/res/res_timing_pthread.c 155164 
>   /trunk/utils/hashtest2.c 155164 
> 
> Diff: http://reviewboard.digium.com/r/36/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Sean
> 
>




More information about the asterisk-dev mailing list