From d523901ddc5bd20ac04d17dff345c9e58448e236 Mon Sep 17 00:00:00 2001 From: Badlop Date: Fri, 10 Dec 2010 17:26:21 +0100 Subject: [PATCH] Include From attribute in the stream header of outgoing S2S connections --- src/ejabberd_s2s_out.erl | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/ejabberd_s2s_out.erl b/src/ejabberd_s2s_out.erl index 73d45c0c6..6773e0dc1 100644 --- a/src/ejabberd_s2s_out.erl +++ b/src/ejabberd_s2s_out.erl @@ -222,8 +222,9 @@ open_socket(init, StateData) -> StateData#state.server, ?NS_JABBER_SERVER, Version), + OpeningWithFrom = exmpp_stream:set_initiating_entity(Opening, StateData#state.myname), send_element(NewStateData, - exmpp_stream:set_dialback_support(Opening)), + exmpp_stream:set_dialback_support(OpeningWithFrom)), {next_state, wait_for_stream, NewStateData, ?FSMTIMEOUT}; {error, _Reason} -> ?INFO_MSG("s2s connection: ~s -> ~s (remote server not found)", @@ -568,8 +569,9 @@ wait_for_auth_result({xmlstreamelement, El}, StateData) -> StateData#state.server, ?NS_JABBER_SERVER, "1.0"), + OpeningWithFrom = exmpp_stream:set_initiating_entity(Opening, StateData#state.myname), send_element(StateData, - exmpp_stream:set_dialback_support(Opening)), + exmpp_stream:set_dialback_support(OpeningWithFrom)), {next_state, wait_for_stream, StateData#state{streamid = new_id(), authenticated = true @@ -632,8 +634,9 @@ wait_for_starttls_proceed({xmlstreamelement, El}, StateData) -> StateData#state.server, ?NS_JABBER_SERVER, "1.0"), + OpeningWithFrom = exmpp_stream:set_initiating_entity(Opening, StateData#state.myname), send_element(NewStateData, - exmpp_stream:set_dialback_support(Opening)), + exmpp_stream:set_dialback_support(OpeningWithFrom)), {next_state, wait_for_stream, NewStateData, ?FSMTIMEOUT}; _ -> send_element(StateData, exmpp_stream:error('bad-format')),