25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +01:00

Get rid of references to non-existent module

This commit is contained in:
Evgeniy Khramtsov 2013-03-29 19:38:01 +10:00
parent 299a0f823a
commit 0d80e7e68a
2 changed files with 14 additions and 17 deletions

View File

@ -1942,16 +1942,14 @@ is_privacy_allow(StateData, From, To, Packet, Dir) ->
presence_broadcast(StateData, From, JIDSet, Packet) -> presence_broadcast(StateData, From, JIDSet, Packet) ->
JIDs = ?SETS:to_list(JIDSet), JIDs = ?SETS:to_list(JIDSet),
JIDs2 = format_and_check_privacy(From, StateData, Packet, JIDs, out), JIDs2 = format_and_check_privacy(From, StateData, Packet, JIDs, out),
Server = StateData#state.server, send_multiple(StateData, From, JIDs2, Packet).
send_multiple(From, Server, JIDs2, Packet).
%% Send presence when updating presence %% Send presence when updating presence
presence_broadcast_to_trusted(StateData, From, Trusted, JIDSet, Packet) -> presence_broadcast_to_trusted(StateData, From, Trusted, JIDSet, Packet) ->
JIDs = ?SETS:to_list(JIDSet), JIDs = ?SETS:to_list(JIDSet),
JIDs_trusted = [JID || JID <- JIDs, ?SETS:is_element(JID, Trusted)], JIDs_trusted = [JID || JID <- JIDs, ?SETS:is_element(JID, Trusted)],
JIDs2 = format_and_check_privacy(From, StateData, Packet, JIDs_trusted, out), JIDs2 = format_and_check_privacy(From, StateData, Packet, JIDs_trusted, out),
Server = StateData#state.server, send_multiple(StateData, From, JIDs2, Packet).
send_multiple(From, Server, JIDs2, Packet).
%% Send presence when connecting %% Send presence when connecting
presence_broadcast_first(From, StateData, Packet) -> presence_broadcast_first(From, StateData, Packet) ->
@ -1963,7 +1961,7 @@ presence_broadcast_first(From, StateData, Packet) ->
PacketProbe = #xmlel{name = <<"presence">>, attrs = [{<<"type">>,<<"probe">>}], children = []}, PacketProbe = #xmlel{name = <<"presence">>, attrs = [{<<"type">>,<<"probe">>}], children = []},
JIDs2Probe = format_and_check_privacy(From, StateData, Packet, JIDsProbe, out), JIDs2Probe = format_and_check_privacy(From, StateData, Packet, JIDsProbe, out),
Server = StateData#state.server, Server = StateData#state.server,
send_multiple(From, Server, JIDs2Probe, PacketProbe), send_multiple(StateData, From, JIDs2Probe, PacketProbe),
{As, JIDs} = {As, JIDs} =
?SETS:fold( ?SETS:fold(
fun(JID, {A, JID_list}) -> fun(JID, {A, JID_list}) ->
@ -1973,7 +1971,7 @@ presence_broadcast_first(From, StateData, Packet) ->
StateData#state.pres_f), StateData#state.pres_f),
JIDs2 = format_and_check_privacy(From, StateData, Packet, JIDs, out), JIDs2 = format_and_check_privacy(From, StateData, Packet, JIDs, out),
Server = StateData#state.server, Server = StateData#state.server,
send_multiple(From, Server, JIDs2, Packet), send_multiple(StateData, From, JIDs2, Packet),
StateData#state{pres_a = As}. StateData#state{pres_a = As}.
format_and_check_privacy(From, StateData, Packet, JIDs, Dir) -> format_and_check_privacy(From, StateData, Packet, JIDs, Dir) ->
@ -1994,9 +1992,16 @@ format_and_check_privacy(From, StateData, Packet, JIDs, Dir) ->
end, end,
FJIDs). FJIDs).
send_multiple(From, Server, JIDs, Packet) -> send_multiple(StateData, From, JIDs, Packet) ->
ejabberd_router_multicast:route_multicast(From, Server, JIDs, Packet). lists:foreach(
fun(JID) ->
case privacy_check_packet(StateData, From, JID, Packet, out) of
deny ->
ok;
allow ->
ejabberd_router:route(From, JID, Packet)
end
end, JIDs).
remove_element(E, Set) -> remove_element(E, Set) ->
case (?SETS):is_element(E, Set) of case (?SETS):is_element(E, Set) of

View File

@ -63,13 +63,6 @@ init([]) ->
brutal_kill, brutal_kill,
worker, worker,
[ejabberd_router]}, [ejabberd_router]},
Router_multicast =
{ejabberd_router_multicast,
{ejabberd_router_multicast, start_link, []},
permanent,
brutal_kill,
worker,
[ejabberd_router_multicast]},
SM = SM =
{ejabberd_sm, {ejabberd_sm,
{ejabberd_sm, start_link, []}, {ejabberd_sm, start_link, []},
@ -196,7 +189,6 @@ init([]) ->
NodeGroups, NodeGroups,
SystemMonitor, SystemMonitor,
Router, Router,
Router_multicast,
SM, SM,
S2S, S2S,
Local, Local,