diff options
author | Alexandru Scvortov <alexandru@rabbitmq.com> | 2010-07-09 12:59:30 +0100 |
---|---|---|
committer | Alexandru Scvortov <alexandru@rabbitmq.com> | 2010-07-09 12:59:30 +0100 |
commit | 731c8661d3a7b18b8ab2f639d5639201f4f248fc (patch) | |
tree | 83a59586b02d5062d32fa8d66e2d72e3228464d1 | |
parent | fffe3cbb873936f469b2096fb4c89e4f83518b98 (diff) | |
download | rabbitmq-server-731c8661d3a7b18b8ab2f639d5639201f4f248fc.tar.gz |
finished transition from regexp to re
-rw-r--r-- | src/rabbit_access_control.erl | 7 | ||||
-rw-r--r-- | src/rabbit_exchange_type_topic.erl | 2 |
2 files changed, 4 insertions, 5 deletions
diff --git a/src/rabbit_access_control.erl b/src/rabbit_access_control.erl index 9590d380..f9e98094 100644 --- a/src/rabbit_access_control.erl +++ b/src/rabbit_access_control.erl @@ -174,10 +174,9 @@ check_resource_access(Username, [#user_permission{permission = P}] -> case re:run( binary_to_list(Name), - binary_to_list(element(permission_index(Permission), P)), - [{return, list}]) of - {match, _, _} -> true; - nomatch -> false + binary_to_list(element(permission_index(Permission), P))) of + {match, _} -> true; + nomatch -> false end end, if Res -> ok; diff --git a/src/rabbit_exchange_type_topic.erl b/src/rabbit_exchange_type_topic.erl index ae6b20eb..53f36cde 100644 --- a/src/rabbit_exchange_type_topic.erl +++ b/src/rabbit_exchange_type_topic.erl @@ -67,7 +67,7 @@ publish(#exchange{name = Name}, Delivery = Delivery). split_topic_key(Key) -> - KeySplit = re:split(binary_to_list(Key), "\\.", [{return, list}]), + KeySplit = re:split(Key, "\\.", [{return, list}]), KeySplit. topic_matches(PatternKey, RoutingKey) -> |