summaryrefslogtreecommitdiff
path: root/src/rabbit_binding.erl
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2011-03-29 11:29:13 +0100
committerSimon MacMullen <simon@rabbitmq.com>2011-03-29 11:29:13 +0100
commit85c36851e257c454a3e1039160fe7b08eb65f2eb (patch)
tree96b531e8c5608fd035957ad4ae0997beb95c7f46 /src/rabbit_binding.erl
parente876d31d003d2a234e9848101ef1545720e25a4e (diff)
downloadrabbitmq-server-85c36851e257c454a3e1039160fe7b08eb65f2eb.tar.gz
Don't attempt to provide a serial for the x deleted event, we weren't doing it right anyway. Create the table entry at exchange creation time.
Diffstat (limited to 'src/rabbit_binding.erl')
-rw-r--r--src/rabbit_binding.erl8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/rabbit_binding.erl b/src/rabbit_binding.erl
index 54fa1a63..6384cf0e 100644
--- a/src/rabbit_binding.erl
+++ b/src/rabbit_binding.erl
@@ -134,7 +134,7 @@ add(Binding, InnerFun) ->
add_notify(X, B) ->
ok = rabbit_exchange:callback(X, add_binding, [transaction, X, B]),
- Serial = rabbit_exchange:serial(X),
+ Serial = rabbit_exchange:serial(X, binding),
fun () ->
ok = rabbit_exchange:callback(X, add_binding, [Serial, X, B]),
ok = rabbit_event:notify(binding_created, info(B))
@@ -411,7 +411,11 @@ process_deletions(Deletions) ->
fun (XName, {X, Deleted, Bindings}, Acc) ->
FlatBindings = lists:flatten(Bindings),
pd_callback(transaction, X, Deleted, FlatBindings),
- dict:store(XName, rabbit_exchange:serial(X), Acc)
+ dict:store(XName, rabbit_exchange:serial(
+ X, case Deleted of
+ deleted -> exchange;
+ not_deleted -> binding
+ end), Acc)
end, dict:new(), Deletions),
fun() ->
dict:fold(