From b82b93f8f0c229e94a89469b0754bab0e28cd17c Mon Sep 17 00:00:00 2001 From: Evgeniy Khramtsov Date: Sat, 29 Apr 2017 11:39:40 +0300 Subject: Don't validate an option in ejabberd_config:get_option() functions The commit introduces the following changes: * Now there is no need to pass validating function in ejabberd_config:get_option() functions, because the configuration keeps already validated values. * New function ejabberd_config:get_option/1 is introduced * Function ejabberd_config:get_option/3 is deprecated. If the function is still called, the second argument (validating function) is simply ignored. * The second argument for ejabberd_config:get_option/2 is now a default value, not a validating function. --- src/ejabberd_c2s_config.erl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/ejabberd_c2s_config.erl') diff --git a/src/ejabberd_c2s_config.erl b/src/ejabberd_c2s_config.erl index 0f0a2a875..b94bbdc52 100644 --- a/src/ejabberd_c2s_config.erl +++ b/src/ejabberd_c2s_config.erl @@ -33,8 +33,7 @@ %% Get first c2s configuration limitations to apply it to other c2s %% connectors. get_c2s_limits() -> - C2SFirstListen = ejabberd_config:get_option( - listen, fun ejabberd_listener:validate_cfg/1, []), + C2SFirstListen = ejabberd_config:get_option(listen, []), case lists:keysearch(ejabberd_c2s, 2, C2SFirstListen) of false -> []; {value, {_Port, ejabberd_c2s, Opts}} -> -- cgit v1.2.3