mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-30 16:36:29 +01:00
Include From attribute in the stream header of outgoing S2S connections
This commit is contained in:
parent
faf422202f
commit
44b2002504
@ -108,6 +108,7 @@
|
|||||||
"xmlns:stream='http://etherx.jabber.org/streams' "
|
"xmlns:stream='http://etherx.jabber.org/streams' "
|
||||||
"xmlns='jabber:server' "
|
"xmlns='jabber:server' "
|
||||||
"xmlns:db='jabber:server:dialback' "
|
"xmlns:db='jabber:server:dialback' "
|
||||||
|
"from='~s' "
|
||||||
"to='~s'~s>"
|
"to='~s'~s>"
|
||||||
).
|
).
|
||||||
|
|
||||||
@ -227,7 +228,7 @@ open_socket(init, StateData) ->
|
|||||||
tls_enabled = false,
|
tls_enabled = false,
|
||||||
streamid = new_id()},
|
streamid = new_id()},
|
||||||
send_text(NewStateData, io_lib:format(?STREAM_HEADER,
|
send_text(NewStateData, io_lib:format(?STREAM_HEADER,
|
||||||
[StateData#state.server,
|
[StateData#state.myname, StateData#state.server,
|
||||||
Version])),
|
Version])),
|
||||||
{next_state, wait_for_stream, NewStateData, ?FSMTIMEOUT};
|
{next_state, wait_for_stream, NewStateData, ?FSMTIMEOUT};
|
||||||
{error, _Reason} ->
|
{error, _Reason} ->
|
||||||
@ -561,7 +562,7 @@ wait_for_auth_result({xmlstreamelement, El}, StateData) ->
|
|||||||
ejabberd_socket:reset_stream(StateData#state.socket),
|
ejabberd_socket:reset_stream(StateData#state.socket),
|
||||||
send_text(StateData,
|
send_text(StateData,
|
||||||
io_lib:format(?STREAM_HEADER,
|
io_lib:format(?STREAM_HEADER,
|
||||||
[StateData#state.server,
|
[StateData#state.myname, StateData#state.server,
|
||||||
" version='1.0'"])),
|
" version='1.0'"])),
|
||||||
{next_state, wait_for_stream,
|
{next_state, wait_for_stream,
|
||||||
StateData#state{streamid = new_id(),
|
StateData#state{streamid = new_id(),
|
||||||
@ -646,7 +647,7 @@ wait_for_starttls_proceed({xmlstreamelement, El}, StateData) ->
|
|||||||
},
|
},
|
||||||
send_text(NewStateData,
|
send_text(NewStateData,
|
||||||
io_lib:format(?STREAM_HEADER,
|
io_lib:format(?STREAM_HEADER,
|
||||||
[StateData#state.server,
|
[StateData#state.myname, StateData#state.server,
|
||||||
" version='1.0'"])),
|
" version='1.0'"])),
|
||||||
{next_state, wait_for_stream, NewStateData, ?FSMTIMEOUT};
|
{next_state, wait_for_stream, NewStateData, ?FSMTIMEOUT};
|
||||||
_ ->
|
_ ->
|
||||||
|
Loading…
Reference in New Issue
Block a user