summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Sebastien Pedron <jean-sebastien@rabbitmq.com>2014-11-24 12:25:34 +0100
committerJean-Sebastien Pedron <jean-sebastien@rabbitmq.com>2014-11-24 12:25:34 +0100
commitcefbfc4554cc112a344b43cce4d678dc871ab8dd (patch)
tree30373c37b428093a2b3ca31b73bc1505856b10ea
parentbed348597806dbd80cf42d6f9bdf68361a86faa5 (diff)
downloadrabbitmq-server-cefbfc4554cc112a344b43cce4d678dc871ab8dd.tar.gz
Restore the "x-dead-letter-exchange" check lost in changeset 12133
-rw-r--r--src/rabbit_amqqueue.erl4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/rabbit_amqqueue.erl b/src/rabbit_amqqueue.erl
index 2e5a5e8c..38c5c855 100644
--- a/src/rabbit_amqqueue.erl
+++ b/src/rabbit_amqqueue.erl
@@ -466,6 +466,7 @@ check_arguments(QueueName, Args, Validators) ->
declare_args() ->
[{<<"x-expires">>, fun check_expires_arg/2},
{<<"x-message-ttl">>, fun check_message_ttl_arg/2},
+ {<<"x-dead-letter-exchange">>, fun check_string_arg/2},
{<<"x-dead-letter-routing-key">>, fun check_dlxrk_arg/2},
{<<"x-max-length">>, fun check_non_neg_int_arg/2},
{<<"x-max-length-bytes">>, fun check_non_neg_int_arg/2}].
@@ -473,6 +474,9 @@ declare_args() ->
consume_args() -> [{<<"x-priority">>, fun check_int_arg/2},
{<<"x-cancel-on-ha-failover">>, fun check_bool_arg/2}].
+check_string_arg({longstr, _}, _) -> ok;
+check_string_arg({Type, _}, _) -> {error, {unacceptable_type, Type}}.
+
check_int_arg({Type, _}, _) ->
case lists:member(Type, ?INTEGER_ARG_TYPES) of
true -> ok;