From 0ba786241e366da7d3293471ac289f7687e722d1 Mon Sep 17 00:00:00 2001 From: anlicheng Date: Sun, 25 Jun 2023 16:42:44 +0800 Subject: [PATCH] fix publish command --- apps/iot/src/http_handler/http_host_handler.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/iot/src/http_handler/http_host_handler.erl b/apps/iot/src/http_handler/http_host_handler.erl index dea7b52..95779b6 100644 --- a/apps/iot/src/http_handler/http_host_handler.erl +++ b/apps/iot/src/http_handler/http_host_handler.erl @@ -76,9 +76,9 @@ handle_request("POST", "/host/publish_command", _, <<"t_id">> => integer_to_binary(TaskId), <<"t">> => Timeout, <<"ts">> => iot_util:current_time(), - <<"m">> => jiffy:encode(Params, [force_utf8]) + <<"m">> => iolist_to_binary(jiffy:encode(Params, [force_utf8])) }, - BinReply = jiffy:encode(append_service_name(PostParams, Reply), [force_utf8]), + BinReply = iolist_to_binary(jiffy:encode(append_service_name(PostParams, Reply), [force_utf8])), case iot_host:aes_encode(Pid, CommandType, BinReply) of {error, Reason} when is_binary(Reason) ->