From 8231ef42b4d4c9612e3a035be90c7c38e87085a0 Mon Sep 17 00:00:00 2001 From: anlicheng Date: Thu, 10 Aug 2023 16:07:22 +0800 Subject: [PATCH] fix --- apps/iot/src/iot_host.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/iot/src/iot_host.erl b/apps/iot/src/iot_host.erl index 5176087..0c96620 100644 --- a/apps/iot/src/iot_host.erl +++ b/apps/iot/src/iot_host.erl @@ -223,10 +223,10 @@ handle_event({call, From}, {create_session, PubKey}, denied, State = #state{uuid {keep_state, State, [{reply, From, {ok, <<10:8, EncReply/binary>>}}]}; handle_event({call, From}, {create_session, PubKey}, StateName, State = #state{uuid = UUID, aes = Aes}) -> - lager:debug("[iot_host] host_id(~p) uuid: ~p, create_session, will change status", [StateName, UUID]), Reply = #{<<"a">> => true, <<"aes">> => Aes}, EncReply = iot_cipher_rsa:encode(Reply, PubKey), - {ok, _} = host_bo:change_status(UUID, ?HOST_STATUS_ONLINE), + {ok, AffectedRow} = host_bo:change_status(UUID, ?HOST_STATUS_ONLINE), + lager:debug("[iot_host] host_id(~p) uuid: ~p, create_session, will change status, affected_row: ~p", [StateName, UUID, AffectedRow]), {next_state, session, State, [{reply, From, {ok, <<10:8, EncReply/binary>>}}]};