[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.
Jason Parker
reviewboard at asterisk.org
Fri Jun 15 10:16:03 CDT 2012
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1991/#review6482
-----------------------------------------------------------
/branches/1.8/include/asterisk/adsi.h
<https://reviewboard.asterisk.org/r/1991/#comment12226>
It would make a lot of sense to put version before any other items in the struct. If Asterisk gets updated, but a module does not, then it would be looking for version where somenewfunc may be.
/branches/1.8/main/adsi.c
<https://reviewboard.asterisk.org/r/1991/#comment12227>
Did I miss the definition of AST_ADSI_VERSION somewhere?
/branches/1.8/res/res_adsi.c
<https://reviewboard.asterisk.org/r/1991/#comment12225>
I think you can remove AST_MODFLAG_GLOBAL_SYMBOLS here.
/branches/1.8/res/res_adsi.exports.in
<https://reviewboard.asterisk.org/r/1991/#comment12224>
I don't think you need this file to exist anymore.
- Jason
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/416f00f2/attachment-0001.htm>
More information about the asterisk-dev
mailing list