fix
This commit is contained in:
parent
86effab931
commit
681ac70d10
@ -36,7 +36,7 @@ handle_request("POST", "/network/delete", _, #{<<"id">> := NetworkId}) when Netw
|
|||||||
end
|
end
|
||||||
end;
|
end;
|
||||||
|
|
||||||
handle_request("POST", "/network/exit_node_control", _, #{<<"id">> := NetworkId, <<"action">> := Action, <<"dst_mac">> := DstMac, <<"remark">> := Remark, <<"timeout">> := Timeout}) when NetworkId > 0 ->
|
handle_request("POST", "/network/exit_node_control", _, #{<<"id">> := NetworkId, <<"action">> := Action, <<"dst_mac">> := DstMac0, <<"remark">> := Remark, <<"timeout">> := Timeout}) when NetworkId > 0 ->
|
||||||
case sdlan_network:get_pid(NetworkId) of
|
case sdlan_network:get_pid(NetworkId) of
|
||||||
undefined ->
|
undefined ->
|
||||||
{ok, 200, sdlan_util:json_data(<<"network not found">>)};
|
{ok, 200, sdlan_util:json_data(<<"network not found">>)};
|
||||||
@ -46,6 +46,7 @@ handle_request("POST", "/network/exit_node_control", _, #{<<"id">> := NetworkId,
|
|||||||
action = Action,
|
action = Action,
|
||||||
remark = Remark
|
remark = Remark
|
||||||
}},
|
}},
|
||||||
|
DstMac = sdlan_util:mac_str_to_bin(DstMac0),
|
||||||
case sdlan_network:command(NetworkId, ReceiverPid, DstMac, SubCommand) of
|
case sdlan_network:command(NetworkId, ReceiverPid, DstMac, SubCommand) of
|
||||||
{error, Reason} ->
|
{error, Reason} ->
|
||||||
{ok, 200, sdlan_util:json_error(-1, Reason)};
|
{ok, 200, sdlan_util:json_error(-1, Reason)};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user