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:
authorEvgeny Khramtsov <ekhramtsov@process-one.net>2019-06-15 12:53:16 +0300
committerEvgeny Khramtsov <ekhramtsov@process-one.net>2019-06-15 12:53:16 +0300
commita205ebad2bd139c0d413a3aa85de045847c5228f (patch)
treee16731302ff2b4b7f7366f98166d25b256fb387b /src/mod_mam.erl
parent67fbbe7a0b3085c921d328d26c96814510394232 (diff)
Get rid of "well-known" type
Diffstat (limited to 'src/mod_mam.erl')
-rw-r--r--src/mod_mam.erl15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/mod_mam.erl b/src/mod_mam.erl
index ba8a9bcfc..1e90689d0 100644
--- a/src/mod_mam.erl
+++ b/src/mod_mam.erl
@@ -176,10 +176,7 @@ init_cache(Mod, Host, Opts) ->
cache_opts(Opts) ->
MaxSize = mod_mam_opt:cache_size(Opts),
CacheMissed = mod_mam_opt:cache_missed(Opts),
- LifeTime = case mod_mam_opt:cache_life_time(Opts) of
- infinity -> infinity;
- I -> timer:seconds(I)
- end,
+ LifeTime = mod_mam_opt:cache_life_time(Opts),
[{max_size, MaxSize}, {life_time, LifeTime}, {cache_missed, CacheMissed}].
stop(Host) ->
@@ -1404,15 +1401,15 @@ mod_opt_type(user_mucsub_from_muc_archive) ->
mod_opt_type(access_preferences) ->
econf:acl();
mod_opt_type(db_type) ->
- econf:well_known(db_type, ?MODULE);
+ econf:db_type(?MODULE);
mod_opt_type(use_cache) ->
- econf:well_known(use_cache, ?MODULE);
+ econf:bool();
mod_opt_type(cache_size) ->
- econf:well_known(cache_size, ?MODULE);
+ econf:pos_int(infinity);
mod_opt_type(cache_missed) ->
- econf:well_known(cache_missed, ?MODULE);
+ econf:bool();
mod_opt_type(cache_life_time) ->
- econf:well_known(cache_life_time, ?MODULE).
+ econf:timeout(second, infinity).
mod_options(Host) ->
[{assume_mam_usage, false},