[asterisk-dev] modules.conf - loading modules

Olle E. Johansson oej at edvina.net
Thu Nov 5 07:47:50 CST 2009


5 nov 2009 kl. 14.41 skrev Russell Bryant:

> Kevin P. Fleming wrote:
>> Olle E. Johansson wrote:
>>
>>> If I add a load= directive for a module in asterisk's modules.conf,
>>> and it doesn't load Asterisk proceeds happily.
>>> I would like a new statement where if Asterisk can't load the module
>>> for some reason - bad config, bad compilation or something else,
>>> Asterisk fails utterly and fails to start.
>>
>> This should not be true; if the module's load_module() function  
>> returns
>> AST_MODULE_LOAD_FAILURE, the loading process will be stopped and
>> Asterisk will not continue starting up. The only way for the module  
>> to
>> let Asterisk continue loading is for that function to return one of  
>> the
>> other AST_MODULE_LOAD_<xxx> values.
>>
>
> Most modules return AST_MODULE_LOAD_DECLINE for errors like missing
> configuration.  AST_MODULE_LOAD_FAILURE is used in unexpected internal
> failure scenarios, such as a failed memory allocation or something.

I have had a lot of issues where external modules that failed to load  
with the new error "not compiled with" or "could not find library  
yyyy" and Asterisk happily continues without the module. Seems like  
the module was never activated, but the load system failed to load it  
for some technichal reason - I don't think we ever reached the point  
where a module could return any error code.

/O






More information about the asterisk-dev mailing list