diff options
| author | Matthias Radestock <matthias@rabbitmq.com> | 2011-04-08 00:24:02 +0100 |
|---|---|---|
| committer | Matthias Radestock <matthias@rabbitmq.com> | 2011-04-08 00:24:02 +0100 |
| commit | e80bc94e5844f79f85150e3b1f6a6463be28687b (patch) | |
| tree | 76790baae2086d707d6bbc41d2eb9fcf590d1bd5 | |
| parent | c512615e243de593d4b114a658273d56ba3e5bc2 (diff) | |
| download | rabbitmq-server-git-e80bc94e5844f79f85150e3b1f6a6463be28687b.tar.gz | |
cosmetic
| -rw-r--r-- | src/rabbit_amqqueue.erl | 5 | ||||
| -rw-r--r-- | src/rabbit_binding.erl | 20 | ||||
| -rw-r--r-- | src/rabbit_exchange.erl | 2 |
3 files changed, 11 insertions, 16 deletions
diff --git a/src/rabbit_amqqueue.erl b/src/rabbit_amqqueue.erl index e813d75c84..77d3841bc5 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 b2d84143fd..8633ed1338 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 2fe98e4b1b..623adf0b6e 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(), |
