mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +01:00
Fix warnings detected by Dialyzer
This commit is contained in:
parent
bacecae3dd
commit
659d546897
@ -310,12 +310,8 @@ create_captcha_x(SID, To, Lang, HeadEls, TailEls) ->
|
|||||||
] ++ TailEls
|
] ++ TailEls
|
||||||
},
|
},
|
||||||
Tref = erlang:send_after(?CAPTCHA_LIFETIME, ?MODULE, {remove_id, Id}),
|
Tref = erlang:send_after(?CAPTCHA_LIFETIME, ?MODULE, {remove_id, Id}),
|
||||||
case ets:insert(captcha, #captcha{id=Id, key=Key, tref=Tref}) of
|
ets:insert(captcha, #captcha{id=Id, key=Key, tref=Tref}),
|
||||||
true ->
|
|
||||||
{ok, [Captcha, Data]};
|
{ok, [Captcha, Data]};
|
||||||
_Err ->
|
|
||||||
error
|
|
||||||
end;
|
|
||||||
_ ->
|
_ ->
|
||||||
error
|
error
|
||||||
end.
|
end.
|
||||||
|
@ -505,9 +505,7 @@ write_time({{Y,Mo,D},{H,Mi,S}}) ->
|
|||||||
|
|
||||||
process_xdata_submit(El) ->
|
process_xdata_submit(El) ->
|
||||||
case exmpp_xml:get_element(El, x) of
|
case exmpp_xml:get_element(El, x) of
|
||||||
false ->
|
#xmlel{} = Xdata ->
|
||||||
error;
|
|
||||||
Xdata ->
|
|
||||||
Fields = jlib:parse_xdata_submit(Xdata),
|
Fields = jlib:parse_xdata_submit(Xdata),
|
||||||
case catch {proplists:get_value("username", Fields),
|
case catch {proplists:get_value("username", Fields),
|
||||||
proplists:get_value("password", Fields)} of
|
proplists:get_value("password", Fields)} of
|
||||||
@ -515,7 +513,9 @@ process_xdata_submit(El) ->
|
|||||||
{ok, User, Pass};
|
{ok, User, Pass};
|
||||||
_ ->
|
_ ->
|
||||||
error
|
error
|
||||||
end
|
end;
|
||||||
|
_ ->
|
||||||
|
error
|
||||||
end.
|
end.
|
||||||
|
|
||||||
is_strong_password(Server, Password) ->
|
is_strong_password(Server, Password) ->
|
||||||
|
Loading…
Reference in New Issue
Block a user