]> granicus.if.org Git - ejabberd/commitdiff
Allow using shaper defined by name like in in s2s_shaper: fast
authorPaweł Chmielowski <pchmielowski@process-one.net>
Thu, 16 Jun 2016 09:04:01 +0000 (11:04 +0200)
committerPaweł Chmielowski <pchmielowski@process-one.net>
Thu, 16 Jun 2016 09:04:01 +0000 (11:04 +0200)
src/acl.erl

index 2840c5880b3c5d318ba2b75fa32804ae1f80ff8d..693219ebe41a257f0db52d308f2638c772c80797 100644 (file)
@@ -515,10 +515,12 @@ parse_ip_netmask(S) ->
       _ -> error
     end.
 
+transform_access_rules_config(Config) when is_list(Config) ->
+    lists:map(fun transform_access_rules_config2/1, lists:flatten(Config));
 transform_access_rules_config(Config) ->
-    lists:map(fun transform_access_rules_config2/1, lists:flatten(Config)).
+    transform_access_rules_config([Config]).
 
-transform_access_rules_config2(Type) when is_integer(Type); Type == allow; Type == deny ->
+transform_access_rules_config2(Type) when is_integer(Type); is_atom(Type) ->
     {Type, [all]};
 transform_access_rules_config2({Type, ACL}) when is_atom(ACL) ->
     {Type, [{acl, ACL}]};