aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEvgeny Khramtsov <ekhramtsov@process-one.net>2019-06-27 11:32:54 +0300
committerEvgeny Khramtsov <ekhramtsov@process-one.net>2019-06-27 11:32:54 +0300
commit2abca350e05e2bf40429a2565663293d0c1356da (patch)
tree3527275d474a39052d43ecb616d93bc90d395711 /src
parentMake sure queue bouncing doesn't yield into infinite recursion (diff)
Fix type specs
Diffstat (limited to 'src')
-rw-r--r--src/ejabberd_piefxis.erl4
-rw-r--r--src/mod_http_upload.erl2
-rw-r--r--src/mod_mqtt_session.erl2
-rw-r--r--src/mod_stream_mgmt.erl2
4 files changed, 5 insertions, 5 deletions
diff --git a/src/ejabberd_piefxis.erl b/src/ejabberd_piefxis.erl
index 68e5119a9..2b93b4f19 100644
--- a/src/ejabberd_piefxis.erl
+++ b/src/ejabberd_piefxis.erl
@@ -385,7 +385,7 @@ process_user(#xmlel{name = <<"user">>, attrs = Attrs, children = Els},
PasswordFormat = ejabberd_auth:password_format(LServer),
Pass = case PasswordFormat of
scram ->
- case Password of
+ case Password of
<<"scram:", PassData/binary>> ->
parse_scram_password(PassData);
P -> P
@@ -520,7 +520,7 @@ process_private(Private, State = #state{user = U, server = S}) ->
stop("Failed to write private: ~p", [Err])
end.
--spec process_vcard(xmlel(), state()) -> {ok, state()} | {error, _}.
+-spec process_vcard(xmpp_element(), state()) -> {ok, state()} | {error, _}.
process_vcard(El, State = #state{user = U, server = S}) ->
JID = jid:make(U, S),
IQ = #iq{type = set, id = p1_rand:get_string(),
diff --git a/src/mod_http_upload.erl b/src/mod_http_upload.erl
index beb164547..ef571274f 100644
--- a/src/mod_http_upload.erl
+++ b/src/mod_http_upload.erl
@@ -565,7 +565,7 @@ process_slot_request(#iq{lang = Lang, from = From} = IQ,
-spec create_slot(state(), jid(), binary(), pos_integer(), binary(), binary(),
binary())
- -> {ok, slot()} | {ok, binary(), binary()} | {error, xmlel()}.
+ -> {ok, slot()} | {ok, binary(), binary()} | {error, xmpp_element()}.
create_slot(#state{service_url = undefined, max_size = MaxSize},
JID, File, Size, _ContentType, XMLNS, Lang)
when MaxSize /= infinity,
diff --git a/src/mod_mqtt_session.erl b/src/mod_mqtt_session.erl
index f886bc3f9..d0abf85d4 100644
--- a/src/mod_mqtt_session.erl
+++ b/src/mod_mqtt_session.erl
@@ -1189,7 +1189,7 @@ authenticate(#connect{password = Pass} = Pkt, IP) ->
%%%===================================================================
%%% Validators
%%%===================================================================
--spec validate_will(connect(), jid:jid()) -> ok | {error, reason_code()}.
+-spec validate_will(connect(), jid:jid()) -> ok | {error, error_reason()}.
validate_will(#connect{will = undefined}, _) ->
ok;
validate_will(#connect{will = #publish{topic = Topic, payload = Payload},
diff --git a/src/mod_stream_mgmt.erl b/src/mod_stream_mgmt.erl
index b0abf1ffb..09af0c7cf 100644
--- a/src/mod_stream_mgmt.erl
+++ b/src/mod_stream_mgmt.erl
@@ -459,7 +459,7 @@ check_h_attribute(#{mgmt_stanzas_out := NumStanzasOut, jid := JID} = State, H) -
[jid:encode(JID), H, NumStanzasOut]),
mgmt_queue_drop(State, H).
--spec update_num_stanzas_in(state(), xmpp_element()) -> state().
+-spec update_num_stanzas_in(state(), xmpp_element() | xmlel()) -> state().
update_num_stanzas_in(#{mgmt_state := MgmtState,
mgmt_stanzas_in := NumStanzasIn} = State, El)
when MgmtState == active; MgmtState == pending ->