fix(eqmx_sasl): Dialyzer warning

This commit is contained in:
Zaiming Shi 2020-11-06 21:53:25 +01:00
parent baaa4e847d
commit 4cfe4e9940
4 changed files with 6 additions and 10 deletions

View File

@ -30,7 +30,7 @@
start(_Type, _Args) ->
ok = emqx_sasl:init(),
emqx_sasl:load(),
_ = emqx_sasl:load(),
emqx_sasl_cli:load(),
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
@ -43,4 +43,4 @@ stop(_State) ->
%%--------------------------------------------------------------------
init([]) ->
{ok, { {one_for_all, 1, 10}, []} }.
{ok, { {one_for_all, 1, 10}, []} }.

View File

@ -217,12 +217,8 @@ nonce() ->
base64:encode([$a + rand:uniform(26) || _ <- lists:seq(1, 10)]).
pbkdf2_sha_1(Password, Salt, IterationCount) ->
case pbkdf2:pbkdf2(sha, Password, Salt, IterationCount) of
{ok, Bin} ->
pbkdf2:to_hex(Bin);
{error, Reason} ->
error(Reason)
end.
{ok, Bin} = pbkdf2:pbkdf2(sha, Password, Salt, IterationCount),
pbkdf2:to_hex(Bin).
-if(?OTP_RELEASE >= 23).
hmac(Key, Data) ->

View File

@ -209,7 +209,7 @@ idle(cast, {incoming, ?SN_PUBLISH_MSG(#mqtt_sn_flags{qos = ?QOS_NEG1,
emqx_broker:publish(Msg);
false ->
ok
end;
end,
?LOG(debug, "Client id=~p receives a publish with QoS=-1 in idle mode!", [ClientId], State),
{keep_state_and_data, State#state.idle_timeout};

View File

@ -44,7 +44,7 @@
, {minirest, {git, "https://github.com/emqx/minirest", {tag, "0.3.2"}}}
, {ecpool, {git, "https://github.com/emqx/ecpool", {tag, "0.5.0"}}}
, {replayq, {git, "https://github.com/emqx/replayq", {tag, "v0.2.0"}}}
, {pbkdf2, {git, "https://github.com/emqx/erlang-pbkdf2.git", {branch, "2.0.3"}}}
, {pbkdf2, {git, "https://github.com/emqx/erlang-pbkdf2.git", {branch, "2.0.4"}}}
, {emqtt, {git, "https://github.com/emqx/emqtt", {tag, "1.2.3"}}}
, {rulesql, {git, "https://github.com/emqx/rulesql", {tag, "0.1.2"}}}
, {getopt, "1.0.1"}