fix
This commit is contained in:
parent
e0262dff73
commit
6cd70bc7ad
@ -78,7 +78,10 @@ handle_request("POST", "/host/publish_command", _,
|
|||||||
<<"ts">> => iot_util:current_time(),
|
<<"ts">> => iot_util:current_time(),
|
||||||
<<"m">> => iolist_to_binary(jiffy:encode(Params, [force_utf8]))
|
<<"m">> => iolist_to_binary(jiffy:encode(Params, [force_utf8]))
|
||||||
},
|
},
|
||||||
BinReply = iolist_to_binary(jiffy:encode(append_service_name(PostParams, Reply), [force_utf8])),
|
|
||||||
|
Reply1 = append_service_name(PostParams, Reply),
|
||||||
|
lager:debug("[http_host_handler] publish message is: ~p", [Reply1]),
|
||||||
|
BinReply = iolist_to_binary(jiffy:encode(Reply1, [force_utf8])),
|
||||||
|
|
||||||
case iot_host:aes_encode(Pid, CommandType, BinReply) of
|
case iot_host:aes_encode(Pid, CommandType, BinReply) of
|
||||||
{error, Reason} when is_binary(Reason) ->
|
{error, Reason} when is_binary(Reason) ->
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user