From 88651d6fc3d3f6bfcd9a94bceec465d9a5271865 Mon Sep 17 00:00:00 2001 From: Matthew Sackman Date: Mon, 14 Feb 2011 18:10:44 +0000 Subject: Pass client capabilities through to the channel --- src/rabbit_direct.erl | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/rabbit_direct.erl') diff --git a/src/rabbit_direct.erl b/src/rabbit_direct.erl index 3b8c9fba..34f868cb 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/3, start_channel/6]). -include("rabbit.hrl"). @@ -28,9 +28,10 @@ -spec(connect/3 :: (binary(), binary(), binary()) -> {'ok', {rabbit_types:user(), rabbit_framing:amqp_table()}}). --spec(start_channel/5 :: (rabbit_channel:channel_number(), pid(), - rabbit_types:user(), rabbit_types:vhost(), pid()) -> - {'ok', pid()}). +-spec(start_channel/6 :: + (rabbit_framing:amqp_table(), rabbit_channel:channel_number(), pid(), + rabbit_types:user(), rabbit_types:vhost(), pid()) -> + {'ok', pid()}). -endif. @@ -67,9 +68,10 @@ connect(Username, Password, VHost) -> {error, broker_not_found_on_node} end. -start_channel(Number, ClientChannelPid, User, VHost, Collector) -> +start_channel(Capabilities, Number, ClientChannelPid, User, VHost, Collector) -> {ok, _, {ChannelPid, _}} = supervisor2:start_child( rabbit_direct_client_sup, - [{direct, Number, ClientChannelPid, User, VHost, Collector}]), + [{direct, Capabilities, Number, ClientChannelPid, User, VHost, + Collector}]), {ok, ChannelPid}. -- cgit v1.2.1 From 63ea1a002366c40646f870602d1efefdd0f2665a Mon Sep 17 00:00:00 2001 From: Matthew Sackman Date: Tue, 15 Feb 2011 11:54:01 +0000 Subject: Move capabilities to after the vhost consistently --- src/rabbit_direct.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/rabbit_direct.erl') diff --git a/src/rabbit_direct.erl b/src/rabbit_direct.erl index 34f868cb..88d9baad 100644 --- a/src/rabbit_direct.erl +++ b/src/rabbit_direct.erl @@ -68,10 +68,10 @@ connect(Username, Password, VHost) -> {error, broker_not_found_on_node} end. -start_channel(Capabilities, Number, ClientChannelPid, User, VHost, Collector) -> +start_channel(Number, ClientChannelPid, User, VHost, Capabilities, Collector) -> {ok, _, {ChannelPid, _}} = supervisor2:start_child( rabbit_direct_client_sup, - [{direct, Capabilities, Number, ClientChannelPid, User, VHost, + [{direct, Number, ClientChannelPid, User, VHost, Capabilities, Collector}]), {ok, ChannelPid}. -- cgit v1.2.1