diff options
author | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2015-06-01 15:38:27 +0300 |
---|---|---|
committer | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2015-06-01 15:38:27 +0300 |
commit | fb6267f38ee47f3f725f88324d132741c85dfb6a (patch) | |
tree | d63c5efd207a736f9215d645ccb881bba942ed6a /src/mod_http_bind.erl | |
parent | Do not try to fetch module options via eldap_utils (diff) |
Add config validation at startup
Diffstat (limited to '')
-rw-r--r-- | src/mod_http_bind.erl | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mod_http_bind.erl b/src/mod_http_bind.erl index 773ef241..1c772ce1 100644 --- a/src/mod_http_bind.erl +++ b/src/mod_http_bind.erl @@ -37,7 +37,7 @@ -behaviour(gen_mod). --export([start/2, stop/1, process/2]). +-export([start/2, stop/1, process/2, mod_opt_type/1]). -include("ejabberd.hrl"). -include("logger.hrl"). @@ -142,3 +142,9 @@ migrate_database() -> %% of actually migrating data, let's just destroy the table mnesia:delete_table(http_bind) end. + +mod_opt_type(max_inactivity) -> + fun (I) when is_integer(I), I > 0 -> I end; +mod_opt_type(max_pause) -> + fun (I) when is_integer(I), I > 0 -> I end; +mod_opt_type(_) -> [max_inactivity, max_pause]. |