mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-26 17:38:45 +01:00
Improve some type specs
This commit is contained in:
parent
e77172a784
commit
76e9555d55
@ -169,7 +169,7 @@ calc_checksum(Data) ->
|
||||
Key = ejabberd_config:get_option(shared_key),
|
||||
base64:encode(crypto:hash(sha, <<Data/binary, Key/binary>>)).
|
||||
|
||||
-spec callback(atom() | pid(), #iq{}, term()) -> any().
|
||||
-spec callback(atom() | pid(), #iq{} | timeout, term()) -> any().
|
||||
callback(undefined, IQRes, Fun) ->
|
||||
Fun(IQRes);
|
||||
callback(Proc, IQRes, Ctx) ->
|
||||
|
@ -142,9 +142,9 @@ route_error(From, To, Packet, #stanza_error{} = Err) ->
|
||||
route(From, To, xmpp:make_error(Packet, Err))
|
||||
end.
|
||||
|
||||
-spec route_iq(iq(), term()) -> ok.
|
||||
route_iq(IQ, State) ->
|
||||
route_iq(IQ, State, undefined, ?IQ_TIMEOUT).
|
||||
-spec route_iq(iq(), fun((iq() | timeout) -> any())) -> ok.
|
||||
route_iq(IQ, Fun) ->
|
||||
route_iq(IQ, Fun, undefined, ?IQ_TIMEOUT).
|
||||
|
||||
-spec route_iq(iq(), term(), pid() | atom()) -> ok.
|
||||
route_iq(IQ, State, Proc) ->
|
||||
|
Loading…
Reference in New Issue
Block a user