diff options
author | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2018-06-14 18:58:35 +0300 |
---|---|---|
committer | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2018-06-14 18:58:35 +0300 |
commit | 49b08949b17bac12c534f6f8abe8e978689be8be (patch) | |
tree | 7b69f790aec00a73666a8833bed596d6858d05de /src | |
parent | Get rid of ejabberd.hrl reference from the test suite (diff) |
Do not check for deprecated types
Since we support only Erlang >= OTP-17.5, the check for old-style
dict/queue/etc types is no longer needed
Diffstat (limited to 'src')
-rw-r--r-- | src/ejabberd_bosh.erl | 5 | ||||
-rw-r--r-- | src/eldap.erl | 5 | ||||
-rw-r--r-- | src/mod_delegation.erl | 5 | ||||
-rw-r--r-- | src/mod_irc_connection.erl | 3 | ||||
-rw-r--r-- | src/mod_muc_room.erl | 16 | ||||
-rw-r--r-- | src/mod_privilege.erl | 3 |
6 files changed, 16 insertions, 21 deletions
diff --git a/src/ejabberd_bosh.erl b/src/ejabberd_bosh.erl index b1519aedb..7423211ba 100644 --- a/src/ejabberd_bosh.erl +++ b/src/ejabberd_bosh.erl @@ -44,7 +44,6 @@ handle_sync_event/4, handle_info/3, terminate/3, code_change/4]). --include("type_compat.hrl"). -include("logger.hrl"). -include("xmpp.hrl"). -include("ejabberd_http.hrl"). @@ -100,8 +99,8 @@ prev_key = <<"">> :: binary(), prev_poll :: erlang:timestamp() | undefined, max_concat = unlimited :: unlimited | non_neg_integer(), - responses = gb_trees:empty() :: ?TGB_TREE, - receivers = gb_trees:empty() :: ?TGB_TREE, + responses = gb_trees:empty() :: gb_trees:tree(), + receivers = gb_trees:empty() :: gb_trees:tree(), shaped_receivers :: p1_queue:queue(), ip :: inet:ip_address(), max_requests = 1 :: non_neg_integer()}). diff --git a/src/eldap.erl b/src/eldap.erl index 1f2926f4d..fc3b8a29d 100644 --- a/src/eldap.erl +++ b/src/eldap.erl @@ -65,7 +65,6 @@ -behaviour(p1_fsm). --include("type_compat.hrl"). -include("logger.hrl"). %% External exports @@ -139,8 +138,8 @@ passwd = <<"">> :: binary(), id = 0 :: non_neg_integer(), bind_timer = make_ref() :: reference(), - dict = dict:new() :: ?TDICT, - req_q = queue:new() :: ?TQUEUE}). + dict = dict:new() :: dict:dict(), + req_q = queue:new() :: queue:queue()}). %%%---------------------------------------------------------------------- %%% API diff --git a/src/mod_delegation.erl b/src/mod_delegation.erl index 690d41b2f..45e44c497 100644 --- a/src/mod_delegation.erl +++ b/src/mod_delegation.erl @@ -40,13 +40,12 @@ disco_local_features/5, disco_sm_features/5, disco_local_identity/5, disco_sm_identity/5]). --include("type_compat.hrl"). -include("logger.hrl"). -include("xmpp.hrl"). -type disco_acc() :: {error, stanza_error()} | {result, [binary()]} | empty. -record(state, {server_host = <<"">> :: binary(), - delegations = dict:new() :: ?TDICT}). + delegations = dict:new() :: dict:dict()}). -type state() :: #state{}. %%%=================================================================== @@ -222,7 +221,7 @@ code_change(_OldVsn, State, _Extra) -> %%%=================================================================== %%% Internal functions %%%=================================================================== --spec get_delegations(binary()) -> ?TDICT. +-spec get_delegations(binary()) -> dict:dict(). get_delegations(Host) -> Proc = gen_mod:get_module_proc(Host, ?MODULE), try gen_server:call(Proc, get_delegations) of diff --git a/src/mod_irc_connection.erl b/src/mod_irc_connection.erl index 78b50a1b9..a2837f527 100644 --- a/src/mod_irc_connection.erl +++ b/src/mod_irc_connection.erl @@ -39,7 +39,6 @@ handle_sync_event/4, handle_info/3, terminate/3, code_change/4]). --include("type_compat.hrl"). -include("logger.hrl"). -include("xmpp.hrl"). @@ -57,7 +56,7 @@ ident = <<"">> :: binary(), realname = <<"">> :: binary(), nick = <<"">> :: binary(), - channels = dict:new() :: ?TDICT, + channels = dict:new() :: dict:dict(), nickchannel :: binary() | undefined, webirc_password :: binary(), mod = mod_irc :: atom(), diff --git a/src/mod_muc_room.erl b/src/mod_muc_room.erl index a1cab2236..edddd13cf 100644 --- a/src/mod_muc_room.erl +++ b/src/mod_muc_room.erl @@ -83,10 +83,10 @@ -callback set_affiliation(binary(), binary(), binary(), jid(), affiliation(), binary()) -> ok | {error, any()}. -callback set_affiliations(binary(), binary(), binary(), - ?TDICT) -> ok | {error, any()}. + dict:dict()) -> ok | {error, any()}. -callback get_affiliation(binary(), binary(), binary(), binary(), binary()) -> {ok, affiliation()} | {error, any()}. --callback get_affiliations(binary(), binary(), binary()) -> {ok, ?TDICT} | {error, any()}. +-callback get_affiliations(binary(), binary(), binary()) -> {ok, dict:dict()} | {error, any()}. -callback search_affiliation(binary(), binary(), binary(), affiliation()) -> {ok, [{ljid(), {affiliation(), binary()}}]} | {error, any()}. @@ -1106,7 +1106,7 @@ close_room_if_temporary_and_empty(StateData1) -> _ -> {next_state, normal_state, StateData1} end. --spec get_users_and_subscribers(state()) -> ?TDICT. +-spec get_users_and_subscribers(state()) -> dict:dict(). get_users_and_subscribers(StateData) -> OnlineSubscribers = ?DICT:fold( fun(LJID, _, Acc) -> @@ -1291,7 +1291,7 @@ set_affiliation_fallback(JID, Affiliation, StateData, Reason) -> end, StateData#state{affiliations = Affiliations}. --spec set_affiliations(?TDICT, state()) -> state(). +-spec set_affiliations(dict:dict(), state()) -> state(). set_affiliations(Affiliations, #state{config = #config{persistent = false}} = StateData) -> set_affiliations_fallback(Affiliations, StateData); @@ -1307,7 +1307,7 @@ set_affiliations(Affiliations, StateData) -> set_affiliations_fallback(Affiliations, StateData) end. --spec set_affiliations_fallback(?TDICT, state()) -> state(). +-spec set_affiliations_fallback(dict:dict(), state()) -> state(). set_affiliations_fallback(Affiliations, StateData) -> StateData#state{affiliations = Affiliations}. @@ -1370,7 +1370,7 @@ do_get_affiliation_fallback(JID, StateData) -> end end. --spec get_affiliations(state()) -> ?TDICT. +-spec get_affiliations(state()) -> dict:dict(). get_affiliations(#state{config = #config{persistent = false}} = StateData) -> get_affiliations_callback(StateData); get_affiliations(StateData) -> @@ -1385,7 +1385,7 @@ get_affiliations(StateData) -> Affiliations end. --spec get_affiliations_callback(state()) -> ?TDICT. +-spec get_affiliations_callback(state()) -> dict:dict(). get_affiliations_callback(StateData) -> StateData#state.affiliations. @@ -4385,7 +4385,7 @@ wrap(From, To, Packet, Node) -> %% JIDs = [ User#user.jid || {_, User} <- ?DICT:to_list(Users)], %% ejabberd_router_multicast:route_multicast(From, Server, JIDs, Packet). --spec send_wrapped_multiple(jid(), ?TDICT, stanza(), binary(), state()) -> ok. +-spec send_wrapped_multiple(jid(), dict:dict(), stanza(), binary(), state()) -> ok. send_wrapped_multiple(From, Users, Packet, Node, State) -> lists:foreach( fun({_, #user{jid = To}}) -> diff --git a/src/mod_privilege.erl b/src/mod_privilege.erl index 2188169f2..5f2fa3297 100644 --- a/src/mod_privilege.erl +++ b/src/mod_privilege.erl @@ -39,12 +39,11 @@ roster_access/2, process_message/1, process_presence_out/1, process_presence_in/1]). --include("type_compat.hrl"). -include("logger.hrl"). -include("xmpp.hrl"). -record(state, {server_host = <<"">> :: binary(), - permissions = dict:new() :: ?TDICT}). + permissions = dict:new() :: dict:dict()}). %%%=================================================================== %%% API |