[asterisk-dev] [Code Review] Add 'optional API' support to eliminate need for registration of loadable APIs

Russell Bryant russell at digium.com
Wed Nov 26 09:10:58 CST 2008


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



/trunk/include/asterisk/agi.h
<http://reviewboard.digium.com/r/62/#comment279>

    Everything looks good as far as I can see, but optional_api.h is missing from the diff.  :-)


- Russell


On 2008-11-19 07:58:14, Kevin Fleming wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.digium.com/r/62/
> -----------------------------------------------------------
> 
> (Updated 2008-11-19 07:58:14)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> On systems where GCC provides both weak symbols and symbol aliases (pretty widely available), use a combination of them to provide automatically used (or avoided) stub functions for loadable APIs. This patch includes usage of this technique for ast_agi_register() only, but the technique could be used for all loadable APIs (res_musiconhold, res_adsi, res_odbc, etc).
> 
> This technique allows the consumer of the API to safely tell whether any module providing the API has been loaded or not, and then tailor its operation to take that result into account. For app_stack, this means it can optionally register its AGI command; for other modules that depend on the loadable API, they could issue an appropriate error message and safely exit when the loadable API is not present.
> 
> 
> Diffs
> -----
> 
>   /trunk/apps/app_stack.c 157747 
>   /trunk/autoconf/ast_gcc_attribute.m4 157747 
>   /trunk/configure.ac 157747 
>   /trunk/contrib/asterisk-ng-doxygen 157747 
>   /trunk/include/asterisk/agi.h 157747 
>   /trunk/include/asterisk/autoconfig.h.in 157747 
>   /trunk/res/res_agi.c 157747 
> 
> Diff: http://reviewboard.digium.com/r/62/diff
> 
> 
> Testing
> -------
> 
> Compile testing
> 
> 
> Thanks,
> 
> Kevin
> 
>




More information about the asterisk-dev mailing list