summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Sackman <matthew@rabbitmq.com>2010-10-18 12:00:47 +0100
committerMatthew Sackman <matthew@rabbitmq.com>2010-10-18 12:00:47 +0100
commit5631a878cb98a957f22c9a7a8f3ed714bf1a5aab (patch)
tree3976c0724dd146e99b8c8347e8ba1693c7f2e9d6
parent7a026dd587a5e6e2618e5d812f6b58364b112293 (diff)
downloadrabbitmq-server-git-5631a878cb98a957f22c9a7a8f3ed714bf1a5aab.tar.gz
Gratuitous refactoring
-rw-r--r--src/rabbit_channel.erl3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl
index be17742ceb..dcae00bff5 100644
--- a/src/rabbit_channel.erl
+++ b/src/rabbit_channel.erl
@@ -936,9 +936,8 @@ binding_action(Fun, ExchangeNameBin, DestinationType, DestinationNameBin,
{DestinationName, ActualRoutingKey} =
expand_binding(DestinationType, DestinationNameBin, RoutingKey, State),
check_write_permitted(DestinationName, State),
- check_not_default_exchange(DestinationName),
ExchangeName = rabbit_misc:r(VHostPath, exchange, ExchangeNameBin),
- check_not_default_exchange(ExchangeName),
+ [check_not_default_exchange(N) || N <- [DestinationName, ExchangeName]],
check_read_permitted(ExchangeName, State),
case Fun(#binding{source = ExchangeName,
destination = DestinationName,