From: Evgeny Khramtsov Date: Mon, 17 Jun 2019 17:51:04 +0000 (+0300) Subject: Require opt_type/1 callback X-Git-Tag: 19.08~192 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5a5f1887672b4290dae0db72d5e07395367f9159;p=ejabberd Require opt_type/1 callback --- diff --git a/src/ejabberd_config.erl b/src/ejabberd_config.erl index 51acd1652..3bfcf65d2 100644 --- a/src/ejabberd_config.erl +++ b/src/ejabberd_config.erl @@ -62,7 +62,7 @@ -callback options() -> [atom() | {atom(), term()}]. -callback globals() -> [atom()]. --optional_callbacks([globals/0, opt_type/1]). +-optional_callbacks([globals/0]). %%%=================================================================== %%% API @@ -418,7 +418,8 @@ callback_modules(external) -> fun(M) -> case code:ensure_loaded(M) of {module, _} -> - erlang:function_exported(M, options, 0); + erlang:function_exported(M, options, 0) + andalso erlang:function_exported(M, opt_type, 1); {error, _} -> false end