diff options
author | Matthew Sackman <matthew@rabbitmq.com> | 2011-02-17 11:56:49 +0000 |
---|---|---|
committer | Matthew Sackman <matthew@rabbitmq.com> | 2011-02-17 11:56:49 +0000 |
commit | 3451aebcf8a8cf04ee24ea28665454c3920d7637 (patch) | |
tree | 13377b4ca6b8b9e7895853af1fb0e9314d71601a /src/rabbit_direct.erl | |
parent | cf199c4ed528fc93faf86964c84f9484d4a769da (diff) | |
parent | 9c35ddb67e49f4f2c146bc3d9ba30e18a4f67345 (diff) | |
download | rabbitmq-server-3451aebcf8a8cf04ee24ea28665454c3920d7637.tar.gz |
Merging default into bug23657bug23657
Diffstat (limited to 'src/rabbit_direct.erl')
-rw-r--r-- | src/rabbit_direct.erl | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/rabbit_direct.erl b/src/rabbit_direct.erl index 3b8c9fba..bd41a8b9 100644 --- a/src/rabbit_direct.erl +++ b/src/rabbit_direct.erl @@ -16,7 +16,7 @@ -module(rabbit_direct). --export([boot/0, connect/3, start_channel/5]). +-export([boot/0, connect/4, start_channel/5]). -include("rabbit.hrl"). @@ -25,7 +25,7 @@ -ifdef(use_specs). -spec(boot/0 :: () -> 'ok'). --spec(connect/3 :: (binary(), binary(), binary()) -> +-spec(connect/4 :: (binary(), binary(), binary(), rabbit_types:protocol()) -> {'ok', {rabbit_types:user(), rabbit_framing:amqp_table()}}). -spec(start_channel/5 :: (rabbit_channel:channel_number(), pid(), @@ -49,13 +49,14 @@ boot() -> %%---------------------------------------------------------------------------- -connect(Username, Password, VHost) -> +connect(Username, Password, VHost, Protocol) -> case lists:keymember(rabbit, 1, application:which_applications()) of true -> try rabbit_access_control:user_pass_login(Username, Password) of #user{} = User -> try rabbit_access_control:check_vhost_access(User, VHost) of - ok -> {ok, {User, rabbit_reader:server_properties()}} + ok -> {ok, {User, + rabbit_reader:server_properties(Protocol)}} catch exit:#amqp_error{name = access_refused} -> {error, access_refused} |