diff options
author | Simon MacMullen <simon@rabbitmq.com> | 2014-08-12 14:46:51 +0100 |
---|---|---|
committer | Simon MacMullen <simon@rabbitmq.com> | 2014-08-12 14:46:51 +0100 |
commit | b0189fa28f4ca6989e20658ac5276038b8baa7ed (patch) | |
tree | 6a7ccdc87b450a2af31dcad80df700464f77e01e /src/rabbit_policies.erl | |
parent | e4bc598987841d89b4e4b4412bf2fd4d02e2120a (diff) | |
download | rabbitmq-server-b0189fa28f4ca6989e20658ac5276038b8baa7ed.tar.gz |
Renamebug25884
Diffstat (limited to 'src/rabbit_policies.erl')
-rw-r--r-- | src/rabbit_policies.erl | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/rabbit_policies.erl b/src/rabbit_policies.erl index 6903c42e..cc88765f 100644 --- a/src/rabbit_policies.erl +++ b/src/rabbit_policies.erl @@ -35,7 +35,7 @@ register() -> {policy_validator, <<"message-ttl">>}, {policy_validator, <<"expires">>}, {policy_validator, <<"max-length">>}, - {policy_validator, <<"max-bytes">>}]], + {policy_validator, <<"max-length-bytes">>}]], ok. validate_policy(Terms) -> @@ -79,9 +79,8 @@ validate_policy0(<<"max-length">>, Value) validate_policy0(<<"max-length">>, Value) -> {error, "~p is not a valid maximum length", [Value]}; -validate_policy0(<<"max-bytes">>, Value) +validate_policy0(<<"max-length-bytes">>, Value) when is_integer(Value), Value >= 0 -> ok; -validate_policy0(<<"max-bytes">>, Value) -> - {error, "~p is not a valid maximum number of bytes", [Value]}. - +validate_policy0(<<"max-length-bytes">>, Value) -> + {error, "~p is not a valid maximum length in bytes", [Value]}. |