summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Radestock <matthias@rabbitmq.com>2011-04-08 00:24:02 +0100
committerMatthias Radestock <matthias@rabbitmq.com>2011-04-08 00:24:02 +0100
commit34c34d59585af7ae7e51e30301765a5eadff7609 (patch)
tree76790baae2086d707d6bbc41d2eb9fcf590d1bd5
parent03677a7ac3c173a83f5e29123d7cafde96cb4ef6 (diff)
downloadrabbitmq-server-34c34d59585af7ae7e51e30301765a5eadff7609.tar.gz
cosmetic
-rw-r--r--src/rabbit_amqqueue.erl5
-rw-r--r--src/rabbit_binding.erl20
-rw-r--r--src/rabbit_exchange.erl2
3 files changed, 11 insertions, 16 deletions
diff --git a/src/rabbit_amqqueue.erl b/src/rabbit_amqqueue.erl
index e813d75c..77d3841b 100644
--- a/src/rabbit_amqqueue.erl
+++ b/src/rabbit_amqqueue.erl
@@ -16,8 +16,7 @@
-module(rabbit_amqqueue).
--export([start/0, stop/0, declare/5, delete_immediately/1, delete/3,
- purge/1]).
+-export([start/0, stop/0, declare/5, delete_immediately/1, delete/3, purge/1]).
-export([pseudo_queue/2]).
-export([lookup/1, with/2, with_or_die/2, assert_equivalence/5,
check_exclusive_access/2, with_exclusive_access_or_die/3,
@@ -58,7 +57,7 @@
-type(queue_or_not_found() :: rabbit_types:amqqueue() | 'not_found').
--spec(start/0 :: () -> [rabbit_amqqueue:name()]).
+-spec(start/0 :: () -> [name()]).
-spec(stop/0 :: () -> 'ok').
-spec(declare/5 ::
(name(), boolean(), boolean(),
diff --git a/src/rabbit_binding.erl b/src/rabbit_binding.erl
index b2d84143..8633ed13 100644
--- a/src/rabbit_binding.erl
+++ b/src/rabbit_binding.erl
@@ -152,18 +152,14 @@ add(Src, Dst, B) ->
[] -> Durable = all_durable([Src, Dst]),
case (not Durable orelse
mnesia:read({rabbit_durable_route, B}) =:= []) of
- true ->
- ok = sync_binding(B, Durable, fun mnesia:write/3),
- fun (Tx) ->
- ok = rabbit_exchange:callback(Src, add_bindings,
- [Tx, Src, [B]]),
- rabbit_event:notify_if(not Tx, binding_created,
- info(B))
- end;
- %% Binding exists, to queue on node which
- %% is in the middle of starting
- false ->
- rabbit_misc:const(not_found)
+ true -> ok = sync_binding(B, Durable, fun mnesia:write/3),
+ fun (Tx) ->
+ ok = rabbit_exchange:callback(
+ Src, add_bindings, [Tx, Src, [B]]),
+ rabbit_event:notify_if(
+ not Tx, binding_created, info(B))
+ end;
+ false -> rabbit_misc:const(not_found)
end;
[_] -> fun rabbit_misc:const_ok/1
end.
diff --git a/src/rabbit_exchange.erl b/src/rabbit_exchange.erl
index 2fe98e4b..623adf0b 100644
--- a/src/rabbit_exchange.erl
+++ b/src/rabbit_exchange.erl
@@ -36,7 +36,7 @@
-type(type() :: atom()).
-type(fun_name() :: atom()).
--spec(recover/0 :: () -> [rabbit_exchange:name()]).
+-spec(recover/0 :: () -> [name()]).
-spec(callback/3:: (rabbit_types:exchange(), fun_name(), [any()]) -> 'ok').
-spec(declare/6 ::
(name(), type(), boolean(), boolean(), boolean(),