diff options
author | Simon MacMullen <simon@rabbitmq.com> | 2011-03-28 17:54:01 +0100 |
---|---|---|
committer | Simon MacMullen <simon@rabbitmq.com> | 2011-03-28 17:54:01 +0100 |
commit | 4c14d30f7f25451e677c6e2f11ef2f86a64da7c0 (patch) | |
tree | 570b0563912d50838e562162a1c8af81667d2fe8 /src/rabbit_binding.erl | |
parent | 52e4fe98abbaddad26e0547ce0cf6bf51dbaed9f (diff) | |
download | rabbitmq-server-4c14d30f7f25451e677c6e2f11ef2f86a64da7c0.tar.gz |
Cosmetic.
Diffstat (limited to 'src/rabbit_binding.erl')
-rw-r--r-- | src/rabbit_binding.erl | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/rabbit_binding.erl b/src/rabbit_binding.erl index b04bc886..13e829e2 100644 --- a/src/rabbit_binding.erl +++ b/src/rabbit_binding.erl @@ -410,21 +410,21 @@ merge_entry({X1, Deleted1, Bindings1}, {X2, Deleted2, Bindings2}) -> process_deletions(Deletions, transaction) -> process_deletions( - fun (Event, X, Bindings, Acc) -> - pd_callback(transaction, Event, X, Bindings), + fun (Deleted, X, Bindings, Acc) -> + pd_callback(transaction, Deleted, X, Bindings), dict:store(X, serial(X), Acc) end, Deletions, dict:new()); process_deletions(Deletions, Serials) -> process_deletions( - fun (Event, X, Bindings, Acc) -> + fun (Deleted, X, Bindings, Acc) -> [rabbit_event:notify(binding_deleted, info(B)) || B <- Bindings], - pd_callback(dict:fetch(X, Serials), Event, X, Bindings), - case Event of - delete -> rabbit_event:notify(exchange_deleted, + pd_callback(dict:fetch(X, Serials), Deleted, X, Bindings), + case Deleted of + deleted -> rabbit_event:notify(exchange_deleted, [{name, X#exchange.name}]); - _ -> ok + _ -> ok end, Acc end, @@ -433,14 +433,14 @@ process_deletions(Deletions, Serials) -> process_deletions(Fun, Deletions, Acc0) -> dict:fold( fun (_XName, {X, Deleted, Bindings}, Acc) -> - Fun(case Deleted of - not_deleted -> remove_bindings; - deleted -> delete - end, X, lists:flatten(Bindings), Acc) + Fun(Deleted, X, lists:flatten(Bindings), Acc) end, Acc0, Deletions). pd_callback(Arg, CB, X, Bindings) -> - ok = rabbit_exchange:callback(X, CB, [Arg, X, Bindings]). + ok = rabbit_exchange:callback(X, case CB of + not_deleted -> remove_bindings; + deleted -> delete + end, [Arg, X, Bindings]). serial(X) -> case rabbit_exchange:serialise_events(X) of |