Skip to content
This repository has been archived by the owner on Nov 18, 2020. It is now read-only.

Commit

Permalink
Merge bug24154 into default
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob Harrop committed Jun 8, 2011
2 parents 737ccbf + ea3f871 commit 171c81e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
13 changes: 7 additions & 6 deletions include/amqp_client.hrl
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,13 @@
adapter_info = none,
client_properties = []}).

-record(adapter_info, {address = unknown,
port = unknown,
peer_address = unknown,
peer_port = unknown,
name = unknown,
protocol = unknown}).
-record(adapter_info, {address = unknown,
port = unknown,
peer_address = unknown,
peer_port = unknown,
name = unknown,
protocol = unknown,
additional_info = []}).

-define(LOG_DEBUG(Format), error_logger:info_msg(Format)).
-define(LOG_INFO(Format, Args), error_logger:info_msg(Format, Args)).
Expand Down
5 changes: 4 additions & 1 deletion src/amqp_direct_connection.erl
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ info_keys() ->
infos(Items, State) ->
[{Item, i(Item, State)} || Item <- Items].

additional_info(#state{adapter_info = I}) -> I#adapter_info.additional_info.

connect(Params = #amqp_params_direct{username = Username,
node = Node,
adapter_info = Info,
Expand All @@ -102,7 +104,8 @@ connect(Params = #amqp_params_direct{username = Username,
adapter_info = ensure_adapter_info(Info)},
case rpc:call(Node, rabbit_direct, connect,
[Username, VHost, ?PROTOCOL,
infos(?CREATION_EVENT_KEYS, State1)]) of
infos(?CREATION_EVENT_KEYS, State1) ++
additional_info(State1)]) of
{ok, {User, ServerProperties}} ->
{ok, Collector} = SIF(),
State2 = State1#state{user = User,
Expand Down

0 comments on commit 171c81e

Please sign in to comment.