[asterisk-dev] Module name
Kevin P. Fleming
kpfleming at digium.com
Wed Dec 22 19:08:57 UTC 2010
On 12/22/2010 10:59 AM, Olle E. Johansson wrote:
> Are there any well-known or previously unknown dangers with having a module reading it's own module name from inside the module?
>
> I want res_danger.so to know that it was loaded as res_danger.so. If not, I want to know which name that was used. Found out that I can read the module information, but have no clue if I put any code in danger there and can't find any previous examples of reading the resource name outside of the module handler itself.
It should be safe. The information will only change before the module's
load() function is executed, and will be stable after that.
--
Kevin P. Fleming
Digium, Inc. | Director of Software Technologies
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
skype: kpfleming | jabber: kfleming at digium.com
Check us out at www.digium.com & www.asterisk.org
More information about the asterisk-dev
mailing list