]> granicus.if.org Git - ejabberd/commitdiff
Fix type specs
authorEvgeny Khramtsov <ekhramtsov@process-one.net>
Thu, 27 Jun 2019 08:32:54 +0000 (11:32 +0300)
committerEvgeny Khramtsov <ekhramtsov@process-one.net>
Thu, 27 Jun 2019 08:32:54 +0000 (11:32 +0300)
rebar.config
src/ejabberd_piefxis.erl
src/mod_http_upload.erl
src/mod_mqtt_session.erl
src/mod_stream_mgmt.erl

index 7af805f6e3e4f32ba2b0fc477caa9a2ee67a01de..f81e0821c40056e0933fc9e12b7d113cc01e352e 100644 (file)
@@ -23,8 +23,8 @@
         {cache_tab, ".*", {git, "https://github.com/processone/cache_tab", {tag, "1.0.19"}}},
         {fast_tls, ".*", {git, "https://github.com/processone/fast_tls", {tag, "1.1.1"}}},
         {stringprep, ".*", {git, "https://github.com/processone/stringprep", {tag, "1.0.16"}}},
-        {fast_xml, ".*", {git, "https://github.com/processone/fast_xml", {tag, "1.1.36"}}},
-        {xmpp, ".*", {git, "https://github.com/processone/xmpp", "8614cd2b9cacc1429d2b2451e15465bc4703ba11"}},
+        {fast_xml, ".*", {git, "https://github.com/processone/fast_xml", "7fd02f3a2f"}},
+        {xmpp, ".*", {git, "https://github.com/processone/xmpp", "63d467e"}},
         {fast_yaml, ".*", {git, "https://github.com/processone/fast_yaml", {tag, "1.0.19"}}},
        {yconf, ".*", {git, "https://github.com/processone/yconf", "f9c235faf828f52bb01881b172646960d5a8d523"}},
         {jiffy, ".*", {git, "https://github.com/davisp/jiffy", {tag, "0.14.8"}}},
index 68e5119a98b9f70405700b7c03ee3bd90594737a..2b93b4f19025800b5fcbed32e137cf229631cfc0 100644 (file)
@@ -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(),
index beb164547e9aafe6cedcf17b0a2aac85610b4052..ef571274fd4b54ad061c4a236b0075b4c167bcc7 100644 (file)
@@ -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,
index f886bc3f981da4d1e55dc44e243f21c8c06f0650..d0abf85d4c0ef8b334b6fee8567a0fb2d6007110 100644 (file)
@@ -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},
index b0abf1ffb0bab23d40c65a8ed378620f659e7e8f..09af0c7cfa6dc727e3f8f56099ab219dd0f593aa 100644 (file)
@@ -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 ->