summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Klishin <michael@clojurewerkz.org>2016-05-15 14:23:43 +0800
committerMichael Klishin <michael@clojurewerkz.org>2016-05-15 14:23:43 +0800
commit456fef7db0575e21b4a16e56543a71e81f847cc0 (patch)
tree5ec05f5b603b0e15000748d060cbc14ce48ffb10 /src
parent972039cc92eeb3e8e9e01e297330e7fc2ca02904 (diff)
parent788d33258fc2c38b754be8a59eab7110db5d76ff (diff)
downloadrabbitmq-server-git-456fef7db0575e21b4a16e56543a71e81f847cc0.tar.gz
Merge branch 'stable'
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_binding.erl4
-rw-r--r--src/rabbit_policy.erl4
2 files changed, 5 insertions, 3 deletions
diff --git a/src/rabbit_binding.erl b/src/rabbit_binding.erl
index 299e254c50..8904c1dd74 100644
--- a/src/rabbit_binding.erl
+++ b/src/rabbit_binding.erl
@@ -100,7 +100,8 @@
-define(INFO_KEYS, [source_name, source_kind,
destination_name, destination_kind,
- routing_key, arguments]).
+ routing_key, arguments,
+ vhost]).
recover(XNames, QNames) ->
rabbit_misc:table_filter(
@@ -272,6 +273,7 @@ infos(Items, B) -> [{Item, i(Item, B)} || Item <- Items].
i(source_name, #binding{source = SrcName}) -> SrcName#resource.name;
i(source_kind, #binding{source = SrcName}) -> SrcName#resource.kind;
+i(vhost, #binding{source = SrcName}) -> SrcName#resource.virtual_host;
i(destination_name, #binding{destination = DstName}) -> DstName#resource.name;
i(destination_kind, #binding{destination = DstName}) -> DstName#resource.kind;
i(routing_key, #binding{key = RoutingKey}) -> RoutingKey;
diff --git a/src/rabbit_policy.erl b/src/rabbit_policy.erl
index d04551043e..eb8cf63327 100644
--- a/src/rabbit_policy.erl
+++ b/src/rabbit_policy.erl
@@ -221,11 +221,11 @@ validate(_VHost, <<"policy">>, Name, Term, _User) ->
Name, policy_validation(), Term).
notify(VHost, <<"policy">>, Name, Term) ->
- rabbit_event:notify(policy_set, [{name, Name} | Term]),
+ rabbit_event:notify(policy_set, [{name, Name}, {vhost, VHost} | Term]),
update_policies(VHost).
notify_clear(VHost, <<"policy">>, Name) ->
- rabbit_event:notify(policy_cleared, [{name, Name}]),
+ rabbit_event:notify(policy_cleared, [{name, Name}, {vhost, VHost}]),
update_policies(VHost).
%%----------------------------------------------------------------------------