From 5a0b8288d4ffb4e954b947d29d2a4d9f9692fa5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20R=C3=A9mond?= Date: Fri, 14 Sep 2007 14:20:15 +0000 Subject: [PATCH] * src/ejabberd_s2s.erl: don't check blacklist for services. SVN Revision: 943 --- src/ejabberd_s2s.erl | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/ejabberd_s2s.erl b/src/ejabberd_s2s.erl index 63e623583..0ab117d59 100644 --- a/src/ejabberd_s2s.erl +++ b/src/ejabberd_s2s.erl @@ -250,9 +250,8 @@ find_connection(From, To) -> %% We try to establish connection if the host is not a %% service and if the s2s host is not blacklisted or %% is in whitelist: - case {is_service(From, To), - allow_host(MyServer, Server)} of - {false, true} -> + case not is_service(From, To) andalso allow_host(MyServer, Server) of + true -> Connections_Result = [new_connection(MyServer, Server, From, FromTo, Max_S2S_Connexions_Number) || _N <- lists:seq(1, Max_S2S_Connexions_Number)], case [PID || {atomic, PID} <- Connections_Result] of @@ -261,7 +260,7 @@ find_connection(From, To) -> PIDs -> {atomic, choose_connection(From, PIDs)} end; - _ -> + false -> {aborted, error} end; L when is_list(L) , length(L) < Max_S2S_Connexions_Number ->