summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Watson <tim@rabbitmq.com>2012-11-05 11:25:10 +0000
committerTim Watson <tim@rabbitmq.com>2012-11-05 11:25:10 +0000
commitfdc57bfb07cdcfc31eb5a9f487196c22c828c5a4 (patch)
treef980aa2755408365f8753f6363b8fcbca8fda200
parent1c1c55f36a072f27c106972d4fbd6ee2f21709ea (diff)
downloadrabbitmq-server-fdc57bfb07cdcfc31eb5a9f487196c22c828c5a4.tar.gz
better function names for ttl and expires checking
-rw-r--r--src/rabbit_amqqueue.erl8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/rabbit_amqqueue.erl b/src/rabbit_amqqueue.erl
index df182796..2b99f712 100644
--- a/src/rabbit_amqqueue.erl
+++ b/src/rabbit_amqqueue.erl
@@ -371,8 +371,8 @@ assert_args_equivalence(#amqqueue{name = QueueName, arguments = Args},
Args, RequiredArgs, QueueName, [<<"x-expires">>, <<"x-message-ttl">>]).
check_declare_arguments(QueueName, Args) ->
- Checks = [{<<"x-expires">>, fun check_positive_int_arg/2},
- {<<"x-message-ttl">>, fun check_non_neg_int_arg/2},
+ Checks = [{<<"x-expires">>, fun check_positive_expires/2},
+ {<<"x-message-ttl">>, fun check_non_neg_ttl/2},
{<<"x-dead-letter-exchange">>, fun check_string_arg/2},
{<<"x-dead-letter-routing-key">>, fun check_dlxrk_arg/2}],
[case rabbit_misc:table_lookup(Args, Key) of
@@ -399,14 +399,14 @@ check_int_arg({Type, _}, _) ->
false -> {error, {unacceptable_type, Type}}
end.
-check_positive_int_arg({Type, Val}, Args) ->
+check_positive_expires({Type, Val}, Args) ->
case check_int_arg({Type, Val}, Args) of
ok when Val > 0 -> rabbit_misc:check_expiry_size(Val);
ok -> {error, {value_zero_or_less, Val}};
Error -> Error
end.
-check_non_neg_int_arg({Type, Val}, Args) ->
+check_non_neg_ttl({Type, Val}, Args) ->
case check_int_arg({Type, Val}, Args) of
ok when Val >= 0 -> rabbit_misc:check_expiry_size(Val);
ok -> {error, {value_less_than_zero, Val}};