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(false) -> false;
|
||||||
parse_bool(V) -> throw({error, {not_boolean, V}}).
|
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
|
try
|
||||||
Params = #amqp_params{username = Context#context.user#user.username,
|
Params = #amqp_params{username = Username,
|
||||||
password = Context#context.password,
|
password = Password,
|
||||||
virtual_host = VHost},
|
virtual_host = VHost},
|
||||||
case amqp_connection:start(direct, Params) of
|
case amqp_connection:start(direct, Params) of
|
||||||
{ok, Conn} ->
|
{ok, Conn} ->
|
||||||
|
|
|
||||||
|
|
@ -36,9 +36,10 @@ resource_exists(ReqData, Context) ->
|
||||||
_ -> true
|
_ -> true
|
||||||
end, ReqData, Context}.
|
end, ReqData, Context}.
|
||||||
|
|
||||||
to_json(ReqData, Context) ->
|
to_json(ReqData, Context = #context{ user = #user { username = Username },
|
||||||
Params = #amqp_params{username = Context#context.user#user.username,
|
password = Password }) ->
|
||||||
password = Context#context.password,
|
Params = #amqp_params{username = Username,
|
||||||
|
password = Password,
|
||||||
virtual_host = rabbit_mgmt_util:vhost(ReqData)},
|
virtual_host = rabbit_mgmt_util:vhost(ReqData)},
|
||||||
%% TODO use network connection (need to check what we're bound to)
|
%% TODO use network connection (need to check what we're bound to)
|
||||||
{ok, Conn} = amqp_connection:start(direct, Params),
|
{ok, Conn} = amqp_connection:start(direct, Params),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue