mirror of
https://github.com/processone/ejabberd
synced 2025-10-03 09:49:18 +02:00
Improve some type specs
This commit is contained in:
parent
e77172a784
commit
76e9555d55
2 changed files with 4 additions and 4 deletions
|
@ -169,7 +169,7 @@ calc_checksum(Data) ->
|
||||||
Key = ejabberd_config:get_option(shared_key),
|
Key = ejabberd_config:get_option(shared_key),
|
||||||
base64:encode(crypto:hash(sha, <<Data/binary, Key/binary>>)).
|
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) ->
|
callback(undefined, IQRes, Fun) ->
|
||||||
Fun(IQRes);
|
Fun(IQRes);
|
||||||
callback(Proc, IQRes, Ctx) ->
|
callback(Proc, IQRes, Ctx) ->
|
||||||
|
|
|
@ -142,9 +142,9 @@ route_error(From, To, Packet, #stanza_error{} = Err) ->
|
||||||
route(From, To, xmpp:make_error(Packet, Err))
|
route(From, To, xmpp:make_error(Packet, Err))
|
||||||
end.
|
end.
|
||||||
|
|
||||||
-spec route_iq(iq(), term()) -> ok.
|
-spec route_iq(iq(), fun((iq() | timeout) -> any())) -> ok.
|
||||||
route_iq(IQ, State) ->
|
route_iq(IQ, Fun) ->
|
||||||
route_iq(IQ, State, undefined, ?IQ_TIMEOUT).
|
route_iq(IQ, Fun, undefined, ?IQ_TIMEOUT).
|
||||||
|
|
||||||
-spec route_iq(iq(), term(), pid() | atom()) -> ok.
|
-spec route_iq(iq(), term(), pid() | atom()) -> ok.
|
||||||
route_iq(IQ, State, Proc) ->
|
route_iq(IQ, State, Proc) ->
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue