diff options
| author | Michael Klishin <michael@clojurewerkz.org> | 2016-05-19 23:11:49 +0300 |
|---|---|---|
| committer | Michael Klishin <michael@clojurewerkz.org> | 2016-05-19 23:11:49 +0300 |
| commit | 1c3dc8d37ab487eb5991735d94a7bf1b66a94c7a (patch) | |
| tree | b2a206e4f947c3c174e6cf98ea2bbe4992b7051a /src | |
| parent | 1dd9ae5f24b2b4f7e6b99d648d37cfc5216ceee6 (diff) | |
| parent | 776dd2423f8e64ad7e387a7bb8e3b34e484f3c9d (diff) | |
| download | rabbitmq-server-git-1c3dc8d37ab487eb5991735d94a7bf1b66a94c7a.tar.gz | |
Merge branch 'stable' into rabbitmq-server-795
Diffstat (limited to 'src')
| -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). %%---------------------------------------------------------------------------- |
