From 08e234f61ed7f7041344f07e37fb8bfb2b304ded Mon Sep 17 00:00:00 2001 From: JianBo He Date: Sat, 7 Dec 2019 20:46:11 +0800 Subject: [PATCH] Fix typo --- src/emqx.app.src.script | 6 +++--- src/emqx_channel.erl | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/emqx.app.src.script b/src/emqx.app.src.script index c2205ceda..b76a11720 100644 --- a/src/emqx.app.src.script +++ b/src/emqx.app.src.script @@ -1,6 +1,6 @@ %%-*- mode: erlang -*- - %% .app.src.script - +%% .app.src.script + Config = case os:getenv("EMQX_DESC") of false -> CONFIG; % env var not defined [] -> CONFIG; % env var set to empty string @@ -31,4 +31,4 @@ case os:getenv("EMQX_DEPS_DEFAULT_VSN") of AppConf0 = lists:keystore(vsn, 1, AppConf, {vsn, RemoveLeadingV(Tag)}), {application, App, AppConf0} end || Conf = {application, App, AppConf} <- Config] -end. \ No newline at end of file +end. diff --git a/src/emqx_channel.erl b/src/emqx_channel.erl index b2a3616dc..dc3940e41 100644 --- a/src/emqx_channel.erl +++ b/src/emqx_channel.erl @@ -375,7 +375,7 @@ process_publish(Packet = ?PUBLISH_PACKET(_QoS, Topic, PacketId), Channel) -> fun check_pub_caps/2 ], Packet, Channel) of {ok, NPacket, NChannel} -> - Msg = pub_to_msg(NPacket, NChannel), + Msg = packet_to_msg(NPacket, NChannel), do_publish(PacketId, Msg, NChannel); {error, ReasonCode, NChannel} -> ?LOG(warning, "Cannot publish message to ~s due to ~s", @@ -383,9 +383,9 @@ process_publish(Packet = ?PUBLISH_PACKET(_QoS, Topic, PacketId), Channel) -> handle_out(disconnect, ReasonCode, NChannel) end. -pub_to_msg(Packet, #channel{conninfo = #{proto_ver := ProtoVer}, - clientinfo = ClientInfo = - #{mountpoint := MountPoint}}) -> +packet_to_msg(Packet, #channel{conninfo = #{proto_ver := ProtoVer}, + clientinfo = ClientInfo = + #{mountpoint := MountPoint}}) -> emqx_mountpoint:mount( MountPoint, emqx_packet:to_message( ClientInfo, #{proto_ver => ProtoVer}, Packet)).