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

Include From attribute in the stream header of outgoing S2S connections

This commit is contained in:
Badlop 2010-12-10 17:26:21 +01:00
parent 41fc44e55f
commit d523901ddc

View File

@ -222,8 +222,9 @@ open_socket(init, StateData) ->
StateData#state.server, StateData#state.server,
?NS_JABBER_SERVER, ?NS_JABBER_SERVER,
Version), Version),
OpeningWithFrom = exmpp_stream:set_initiating_entity(Opening, StateData#state.myname),
send_element(NewStateData, send_element(NewStateData,
exmpp_stream:set_dialback_support(Opening)), exmpp_stream:set_dialback_support(OpeningWithFrom)),
{next_state, wait_for_stream, NewStateData, ?FSMTIMEOUT}; {next_state, wait_for_stream, NewStateData, ?FSMTIMEOUT};
{error, _Reason} -> {error, _Reason} ->
?INFO_MSG("s2s connection: ~s -> ~s (remote server not found)", ?INFO_MSG("s2s connection: ~s -> ~s (remote server not found)",
@ -568,8 +569,9 @@ wait_for_auth_result({xmlstreamelement, El}, StateData) ->
StateData#state.server, StateData#state.server,
?NS_JABBER_SERVER, ?NS_JABBER_SERVER,
"1.0"), "1.0"),
OpeningWithFrom = exmpp_stream:set_initiating_entity(Opening, StateData#state.myname),
send_element(StateData, send_element(StateData,
exmpp_stream:set_dialback_support(Opening)), exmpp_stream:set_dialback_support(OpeningWithFrom)),
{next_state, wait_for_stream, {next_state, wait_for_stream,
StateData#state{streamid = new_id(), StateData#state{streamid = new_id(),
authenticated = true authenticated = true
@ -632,8 +634,9 @@ wait_for_starttls_proceed({xmlstreamelement, El}, StateData) ->
StateData#state.server, StateData#state.server,
?NS_JABBER_SERVER, ?NS_JABBER_SERVER,
"1.0"), "1.0"),
OpeningWithFrom = exmpp_stream:set_initiating_entity(Opening, StateData#state.myname),
send_element(NewStateData, send_element(NewStateData,
exmpp_stream:set_dialback_support(Opening)), exmpp_stream:set_dialback_support(OpeningWithFrom)),
{next_state, wait_for_stream, NewStateData, ?FSMTIMEOUT}; {next_state, wait_for_stream, NewStateData, ?FSMTIMEOUT};
_ -> _ ->
send_element(StateData, exmpp_stream:error('bad-format')), send_element(StateData, exmpp_stream:error('bad-format')),