25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +01:00

fix bad plugin order issue injected in previous patch (EJAB-1286)

This commit is contained in:
Christophe Romain 2010-11-09 14:32:40 +01:00
parent e710ac51eb
commit fbb84c8256

View File

@ -308,7 +308,7 @@ init_plugins(Host, ServerHost, Opts) ->
Plugins = gen_mod:get_opt(plugins, Opts, [?STDNODE]), Plugins = gen_mod:get_opt(plugins, Opts, [?STDNODE]),
PepMapping = gen_mod:get_opt(pep_mapping, Opts, []), PepMapping = gen_mod:get_opt(pep_mapping, Opts, []),
?DEBUG("** PEP Mapping : ~p~n",[PepMapping]), ?DEBUG("** PEP Mapping : ~p~n",[PepMapping]),
Plugins_OK = lists:foldl(fun(Name, Acc) -> PluginsOK = lists:foldl(fun(Name, Acc) ->
Plugin = list_to_atom(?PLUGIN_PREFIX ++ Name), Plugin = list_to_atom(?PLUGIN_PREFIX ++ Name),
case catch apply(Plugin, init, [Host, ServerHost, Opts]) of case catch apply(Plugin, init, [Host, ServerHost, Opts]) of
{'EXIT', _Error} -> {'EXIT', _Error} ->
@ -318,7 +318,7 @@ init_plugins(Host, ServerHost, Opts) ->
[Name | Acc] [Name | Acc]
end end
end, [], Plugins), end, [], Plugins),
{Plugins_OK, TreePlugin, PepMapping}. {lists:reverse(PluginsOK), TreePlugin, PepMapping}.
-spec(terminate_plugins/4 :: -spec(terminate_plugins/4 ::