mod_statsdx: Fix "hooks" option parsing

This commit is contained in:
Holger Weiss 2015-02-15 00:01:33 +01:00
parent bf99a0a97a
commit 0ba0639ec5
1 changed files with 4 additions and 1 deletions

View File

@ -45,7 +45,10 @@
%%%% Module control %%%% Module control
start(Host, Opts) -> start(Host, Opts) ->
Hooks = gen_mod:get_opt(hooks, Opts, fun(O) -> is_atom(O) end, false), Hooks = gen_mod:get_opt(hooks, Opts,
fun(O) when is_boolean(O) -> O;
(traffic) -> traffic
end, false),
%% Default value for the counters %% Default value for the counters
CD = case Hooks of CD = case Hooks of
true -> 0; true -> 0;