]> granicus.if.org Git - ejabberd/commitdiff
Require opt_type/1 callback
authorEvgeny Khramtsov <ekhramtsov@process-one.net>
Mon, 17 Jun 2019 17:51:04 +0000 (20:51 +0300)
committerEvgeny Khramtsov <ekhramtsov@process-one.net>
Mon, 17 Jun 2019 17:51:04 +0000 (20:51 +0300)
src/ejabberd_config.erl

index 51acd16527bdb087066ddcd159a911fd1869f95c..3bfcf65d2a6661ba2e524ae89ca569272ee41279 100644 (file)
@@ -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