25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-24 16:23:40 +01:00

Fix db_type validation

This commit is contained in:
Evgeny Khramtsov 2019-07-31 18:55:43 +03:00
parent aa0f110afe
commit 465e1f5ee1

View File

@ -535,7 +535,7 @@ get_defaults(Host, Module, Opts) ->
lists:filtermap( lists:filtermap(
fun({Opt, T1}) when Opt == db_type; Opt == ram_db_type -> fun({Opt, T1}) when Opt == db_type; Opt == ram_db_type ->
T2 = proplists:get_value(Opt, Opts, T1), T2 = proplists:get_value(Opt, Opts, T1),
DBMod = db_mod(Opt, T2, Module), DBMod = list_to_atom(atom_to_list(Module) ++ "_" ++ atom_to_list(T2)),
case code:ensure_loaded(DBMod) of case code:ensure_loaded(DBMod) of
{module, _} -> {module, _} ->
case erlang:function_exported(DBMod, mod_options, 1) of case erlang:function_exported(DBMod, mod_options, 1) of