[asterisk-dev] [Code Review]: Remove embedding of res_adsi.so and switch ADSI API from using optional API to using stubs if res_adsi.so is not loaded.

Mark Michelson reviewboard at asterisk.org
Fri Jun 15 10:17:45 CDT 2012



> On June 15, 2012, 10:16 a.m., Jason Parker wrote:
> > /branches/1.8/main/adsi.c, line 29
> > <https://reviewboard.asterisk.org/r/1991/diff/1/?file=28922#file28922line29>
> >
> >     Did I miss the definition of AST_ADSI_VERSION somewhere?

Yes. It's in adsi.h


- Mark


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


On June 15, 2012, 9:51 a.m., Mark Michelson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1991/
> -----------------------------------------------------------
> 
> (Updated June 15, 2012, 9:51 a.m.)
> 
> 
> Review request for Asterisk Developers and Leif Madsen.
> 
> 
> Summary
> -------
> 
> When using gcc version 4.5+, weak reference support appears to be disabled. The Makefile logic thus embeds res_adsi.so into the binary. Even with no modules.conf file or with a modules.conf file that specifies "noload => res_adsi" the module is still loaded. If res_adsi.so is not even compiled, then a module called "core" gets loaded on startup instead.
> 
> The fix I propose here is to remove the embedding of res_adsi.so from the Makefile. To fix linking errors that occur in features.c, I also have switched the ADSI API from using the optional API to defining stub functions if res_adsi.so is not loaded. When res_adsi.so is loaded, it provides a function table for the core to farm the work out to.
> 
> 
> This addresses bug ASTERISK-19920.
>     https://issues.asterisk.org/jira/browse/ASTERISK-19920
> 
> 
> Diffs
> -----
> 
>   /branches/1.8/include/asterisk/adsi.h 368806 
>   /branches/1.8/main/Makefile 368927 
>   /branches/1.8/main/adsi.c PRE-CREATION 
>   /branches/1.8/res/res_adsi.c 368806 
>   /branches/1.8/res/res_adsi.exports.in 368806 
> 
> Diff: https://reviewboard.asterisk.org/r/1991/diff
> 
> 
> Testing
> -------
> 
> Compiled using GCC 4.4, 4.5, and 4.6. In all cases, the code compiled cleanly and res_adsi.so was only loaded if it was supposed to be.
> 
> 
> Thanks,
> 
> Mark
> 
>

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


More information about the asterisk-dev mailing list