[asterisk-dev] Module name

Tilghman Lesher tilghman at meg.abyt.es
Wed Dec 22 18:06:31 UTC 2010


On Wednesday 22 December 2010 10:59:14 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.

Shouldn't be a problem, but why not just use the AST_MODULE define directly,
which is how each module gets its name in the first place?

-- 
Tilghman



More information about the asterisk-dev mailing list