25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-22 17:28:25 +01:00

Include ext_mod modules when checking accepted options (ejabberd-contrib#116)

This commit is contained in:
Badlop 2015-09-10 20:11:02 +02:00
parent 8fd9670da2
commit a50f00f9e8
2 changed files with 3 additions and 2 deletions

View File

@ -53,6 +53,7 @@ start(normal, _Args) ->
ejabberd_commands:init(), ejabberd_commands:init(),
ejabberd_admin:start(), ejabberd_admin:start(),
gen_mod:start(), gen_mod:start(),
ext_mod:start(),
ejabberd_config:start(), ejabberd_config:start(),
set_settings_from_config(), set_settings_from_config(),
acl:start(), acl:start(),
@ -67,7 +68,6 @@ start(normal, _Args) ->
%ejabberd_debug:eprof_start(), %ejabberd_debug:eprof_start(),
%ejabberd_debug:fprof_start(), %ejabberd_debug:fprof_start(),
maybe_add_nameservers(), maybe_add_nameservers(),
ext_mod:start(),
ejabberd_auth:start(), ejabberd_auth:start(),
start_modules(), start_modules(),
ejabberd_listener:start_listeners(), ejabberd_listener:start_listeners(),

View File

@ -740,6 +740,7 @@ get_option(Opt, F, Default) ->
get_modules_with_options() -> get_modules_with_options() ->
{ok, Mods} = application:get_key(ejabberd, modules), {ok, Mods} = application:get_key(ejabberd, modules),
ExtMods = [Name || {Name, _Details} <- ext_mod:installed()],
lists:foldl( lists:foldl(
fun(Mod, D) -> fun(Mod, D) ->
case catch Mod:opt_type('') of case catch Mod:opt_type('') of
@ -751,7 +752,7 @@ get_modules_with_options() ->
{'EXIT', {undef, _}} -> {'EXIT', {undef, _}} ->
D D
end end
end, dict:new(), [?MODULE|Mods]). end, dict:new(), [?MODULE|ExtMods++Mods]).
validate_opts(#state{opts = Opts} = State) -> validate_opts(#state{opts = Opts} = State) ->
ModOpts = get_modules_with_options(), ModOpts = get_modules_with_options(),