summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2013-05-10 12:42:37 +0100
committerSimon MacMullen <simon@rabbitmq.com>2013-05-10 12:42:37 +0100
commit4a32421a15a1af8f3af4ce22be43cf0d4b67cf69 (patch)
treeebfa30426f7655150d28d07f013d016e9bec3f12
parente998a4c8ce397ae36d9e26780d9b7b78faed5d75 (diff)
downloadrabbitmq-server-bug25548.tar.gz
Move the ignore of '_'.bug25548
-rw-r--r--src/rabbit_runtime_parameters.erl5
-rw-r--r--src/rabbit_vhost.erl1
2 files changed, 4 insertions, 2 deletions
diff --git a/src/rabbit_runtime_parameters.erl b/src/rabbit_runtime_parameters.erl
index e1c962b4..18eff722 100644
--- a/src/rabbit_runtime_parameters.erl
+++ b/src/rabbit_runtime_parameters.erl
@@ -140,7 +140,10 @@ list(VHost) -> list(VHost, '_').
list_component(Component) -> list('_', Component).
list(VHost, Component) ->
- rabbit_vhost:assert(VHost),
+ case VHost of
+ '_' -> ok;
+ _ -> rabbit_vhost:assert(VHost)
+ end,
Match = #runtime_parameters{key = {VHost, Component, '_'}, _ = '_'},
[p(P) || #runtime_parameters{key = {_VHost, Comp, _Name}} = P <-
mnesia:dirty_match_object(?TABLE, Match),
diff --git a/src/rabbit_vhost.erl b/src/rabbit_vhost.erl
index b5d8b5e4..3bf5354e 100644
--- a/src/rabbit_vhost.erl
+++ b/src/rabbit_vhost.erl
@@ -122,7 +122,6 @@ with(VHostPath, Thunk) ->
end.
%% Like with/2 but outside an Mnesia tx
-assert('_') -> ok;
assert(VHostPath) -> case rabbit_vhost:exists(VHostPath) of
true -> ok;
false -> throw({error, {no_such_vhost, VHostPath}})