Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/processone/ejabberd.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeniy Khramtsov <ekhramtsov@process-one.net>2017-04-30 19:01:47 +0300
committerEvgeniy Khramtsov <ekhramtsov@process-one.net>2017-04-30 19:01:47 +0300
commitfddd6110e00df12c99a20a2cc9d074f5f4f1f965 (patch)
tree366575b855f1b2013db7eeb02ecb213f81c98c1f /src/mod_http_api.erl
parent2b63d07329b2af63d63b14d237e63565f78e8018 (diff)
Don't validate an option in gen_mod:get*opt() functions
The changes are very similar to those from previous commit: * Now there is no need to pass validating function in gen_mod:get_opt() and gen_mod:get_module_opt() functions, because the modules' configuration keeps already validated values. * New functions gen_mod:get_opt/2 and gen_mod:get_module_opt/3 are introduced. * Functions gen_mod:get_opt/4 and get_module_opt/5 are deprecated. If the functions are still called, the "function" argument is simply ignored. * Validating callback Mod:listen_opt_type/1 is introduced to validate listening options at startup.
Diffstat (limited to 'src/mod_http_api.erl')
-rw-r--r--src/mod_http_api.erl4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/mod_http_api.erl b/src/mod_http_api.erl
index c50318ccc..7be05dbf1 100644
--- a/src/mod_http_api.erl
+++ b/src/mod_http_api.erl
@@ -543,9 +543,7 @@ log(Call, Args, IP) ->
?INFO_MSG("API call ~s ~p (~p)", [Call, Args, IP]).
permission_addon() ->
- Access = gen_mod:get_module_opt(global, ?MODULE, admin_ip_access,
- fun(V) -> V end,
- none),
+ Access = gen_mod:get_module_opt(global, ?MODULE, admin_ip_access, none),
Rules = acl:resolve_access(Access, global),
R = case Rules of
all ->