summaryrefslogtreecommitdiff
path: root/src/rabbit_access_control.erl
diff options
context:
space:
mode:
authorAlexandru Scvortov <alexandru@rabbitmq.com>2010-07-09 12:11:22 +0100
committerAlexandru Scvortov <alexandru@rabbitmq.com>2010-07-09 12:11:22 +0100
commitfffe3cbb873936f469b2096fb4c89e4f83518b98 (patch)
treecae77f9092333ea27d25660847e365cc5579110d /src/rabbit_access_control.erl
parent5bfcff6265bd09010015c2e83e13f2120795583a (diff)
downloadrabbitmq-server-fffe3cbb873936f469b2096fb4c89e4f83518b98.tar.gz
replaced regexp with re
Diffstat (limited to 'src/rabbit_access_control.erl')
-rw-r--r--src/rabbit_access_control.erl7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/rabbit_access_control.erl b/src/rabbit_access_control.erl
index 7d1839bb..9590d380 100644
--- a/src/rabbit_access_control.erl
+++ b/src/rabbit_access_control.erl
@@ -172,9 +172,10 @@ check_resource_access(Username,
[] ->
false;
[#user_permission{permission = P}] ->
- case regexp:match(
+ case re:run(
binary_to_list(Name),
- binary_to_list(element(permission_index(Permission), P))) of
+ binary_to_list(element(permission_index(Permission), P)),
+ [{return, list}]) of
{match, _, _} -> true;
nomatch -> false
end
@@ -301,7 +302,7 @@ list_vhosts() ->
validate_regexp(RegexpBin) ->
Regexp = binary_to_list(RegexpBin),
- case regexp:parse(Regexp) of
+ case re:compile(Regexp) of
{ok, _} -> ok;
{error, Reason} -> throw({error, {invalid_regexp, Regexp, Reason}})
end.