From 0ba0639ec508781cbc530b849c5fbb70273acd8d Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Sun, 15 Feb 2015 00:01:33 +0100 Subject: [PATCH] mod_statsdx: Fix "hooks" option parsing --- mod_statsdx/src/mod_statsdx.erl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mod_statsdx/src/mod_statsdx.erl b/mod_statsdx/src/mod_statsdx.erl index 7ea17ec..8da0b1e 100644 --- a/mod_statsdx/src/mod_statsdx.erl +++ b/mod_statsdx/src/mod_statsdx.erl @@ -45,7 +45,10 @@ %%%% Module control 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 CD = case Hooks of true -> 0;