Compile on R12B5.
This commit is contained in:
parent
18bda60953
commit
935b39c2f4
|
|
@ -258,10 +258,12 @@ parse_bool(true) -> true;
|
|||
parse_bool(false) -> false;
|
||||
parse_bool(V) -> throw({error, {not_boolean, V}}).
|
||||
|
||||
amqp_request(VHost, ReqData, Context, Method) ->
|
||||
amqp_request(VHost, ReqData,
|
||||
Context = #context{ user = #user { username = Username },
|
||||
password = Password }, Method) ->
|
||||
try
|
||||
Params = #amqp_params{username = Context#context.user#user.username,
|
||||
password = Context#context.password,
|
||||
Params = #amqp_params{username = Username,
|
||||
password = Password,
|
||||
virtual_host = VHost},
|
||||
case amqp_connection:start(direct, Params) of
|
||||
{ok, Conn} ->
|
||||
|
|
|
|||
|
|
@ -36,9 +36,10 @@ resource_exists(ReqData, Context) ->
|
|||
_ -> true
|
||||
end, ReqData, Context}.
|
||||
|
||||
to_json(ReqData, Context) ->
|
||||
Params = #amqp_params{username = Context#context.user#user.username,
|
||||
password = Context#context.password,
|
||||
to_json(ReqData, Context = #context{ user = #user { username = Username },
|
||||
password = Password }) ->
|
||||
Params = #amqp_params{username = Username,
|
||||
password = Password,
|
||||
virtual_host = rabbit_mgmt_util:vhost(ReqData)},
|
||||
%% TODO use network connection (need to check what we're bound to)
|
||||
{ok, Conn} = amqp_connection:start(direct, Params),
|
||||
|
|
|
|||
Loading…
Reference in New Issue