mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +01:00
When logging s2s out connection attempt or success, log if TLS is used
This commit is contained in:
parent
cf4f0dbe6d
commit
c8033833f9
@ -192,7 +192,8 @@ init([From, Server, Type]) ->
|
||||
open_socket(init, StateData) ->
|
||||
log_s2s_out(StateData#state.new,
|
||||
StateData#state.myname,
|
||||
StateData#state.server),
|
||||
StateData#state.server,
|
||||
StateData#state.tls),
|
||||
?DEBUG("open_socket: ~p", [{StateData#state.myname,
|
||||
StateData#state.server,
|
||||
StateData#state.new,
|
||||
@ -340,8 +341,8 @@ wait_for_validation({xmlstreamelement, El}, StateData) ->
|
||||
case Type of
|
||||
"valid" ->
|
||||
send_queue(StateData, StateData#state.queue),
|
||||
?INFO_MSG("Connection established: ~s -> ~s",
|
||||
[StateData#state.myname, StateData#state.server]),
|
||||
?INFO_MSG("Connection established: ~s -> ~s with TLS=~p",
|
||||
[StateData#state.myname, StateData#state.server, StateData#state.tls_enabled]),
|
||||
ejabberd_hooks:run(s2s_connect_hook,
|
||||
[StateData#state.myname,
|
||||
StateData#state.server]),
|
||||
@ -1151,10 +1152,10 @@ outgoing_s2s_timeout() ->
|
||||
|
||||
%% Human readable S2S logging: Log only new outgoing connections as INFO
|
||||
%% Do not log dialback
|
||||
log_s2s_out(false, _, _) -> ok;
|
||||
log_s2s_out(false, _, _, _) -> ok;
|
||||
%% Log new outgoing connections:
|
||||
log_s2s_out(_, Myname, Server) ->
|
||||
?INFO_MSG("Trying to open s2s connection: ~s -> ~s",[Myname, Server]).
|
||||
log_s2s_out(_, Myname, Server, Tls) ->
|
||||
?INFO_MSG("Trying to open s2s connection: ~s -> ~s with TLS=~p", [Myname, Server, Tls]).
|
||||
|
||||
%% Calculate timeout depending on which state we are in:
|
||||
%% Can return integer > 0 | infinity
|
||||
|
Loading…
Reference in New Issue
Block a user