diff options
| author | Michael Klishin <michael@clojurewerkz.org> | 2016-05-15 14:23:19 +0800 |
|---|---|---|
| committer | Michael Klishin <michael@clojurewerkz.org> | 2016-05-15 14:23:19 +0800 |
| commit | 788d33258fc2c38b754be8a59eab7110db5d76ff (patch) | |
| tree | b457be378bda92323e3d844f7669c75dca2c163b | |
| parent | 5ea6f6ffdf780b014b86d7f9d0b1012360f7cc97 (diff) | |
| parent | a024f3ca6ed6f36b0136b978a664ba3877fffe4b (diff) | |
| download | rabbitmq-server-git-788d33258fc2c38b754be8a59eab7110db5d76ff.tar.gz | |
Merge branch 'rabbitmq-event-exchange-9' into stable
| -rw-r--r-- | src/rabbit_binding.erl | 4 | ||||
| -rw-r--r-- | src/rabbit_policy.erl | 4 |
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). %%---------------------------------------------------------------------------- |
