25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-10-03 14:45:16 +02:00

Add new domain_balancing criteria: broadcast

This commit is contained in:
Evgeniy Khramtsov 2011-09-14 17:40:06 +10:00
parent b0b371d23a
commit d6e81ac06b

View File

@ -378,9 +378,21 @@ do_route(OrigFrom, OrigTo, OrigPacket) ->
jlib:jid_tolower(From));
bare_destination ->
jlib:jid_remove_resource(
jlib:jid_tolower(To))
jlib:jid_tolower(To));
broadcast ->
broadcast
end,
case get_component_number(LDstDomain) of
_ when Value == broadcast ->
lists:foreach(
fun(R) ->
Pid = R#route.pid,
if is_pid(Pid) ->
Pid ! {route, From, To, Packet};
true ->
drop
end
end, Rs);
undefined ->
case [R || R <- Rs, node(R#route.pid) == node()] of
[] ->