[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:32:39 CDT 2012
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1991/
-----------------------------------------------------------
(Updated June 15, 2012, 10:32 a.m.)
Review request for Asterisk Developers and Leif Madsen.
Changes
-------
Added Jason's proposed changes.
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 (updated)
-----
/branches/1.8/res/res_adsi.exports.in 368806
/branches/1.8/res/res_adsi.c 368806
/branches/1.8/main/Makefile 368927
/branches/1.8/main/adsi.c PRE-CREATION
/branches/1.8/include/asterisk/adsi.h 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/41163725/attachment.htm>
More information about the asterisk-dev
mailing list