mod_statsdx: Fix "hooks" option parsing
This commit is contained in:
parent
bf99a0a97a
commit
0ba0639ec5
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue