mirror of
https://github.com/processone/ejabberd.git
synced 2024-06-16 22:05:29 +02:00
Uncomment forgotten block of code
This commit is contained in:
parent
de81c50199
commit
534e73f732
|
@ -170,37 +170,28 @@ wait_for_stream(closed, StateData) ->
|
||||||
wait_for_handshake({xmlstreamelement, El}, StateData) ->
|
wait_for_handshake({xmlstreamelement, El}, StateData) ->
|
||||||
decode_element(El, wait_for_handshake, StateData);
|
decode_element(El, wait_for_handshake, StateData);
|
||||||
wait_for_handshake(#handshake{data = Digest}, StateData) ->
|
wait_for_handshake(#handshake{data = Digest}, StateData) ->
|
||||||
send_element(StateData, #handshake{}),
|
case dict:find(StateData#state.host, StateData#state.host_opts) of
|
||||||
lists:foreach(
|
{ok, Password} ->
|
||||||
fun (H) ->
|
case p1_sha:sha(<<(StateData#state.streamid)/binary,
|
||||||
ejabberd_router:register_route(H, ?MYNAME),
|
Password/binary>>) of
|
||||||
?INFO_MSG("Route registered for service ~p~n",
|
Digest ->
|
||||||
[H]),
|
send_element(StateData, #handshake{}),
|
||||||
ejabberd_hooks:run(component_connected, [H])
|
lists:foreach(
|
||||||
end, dict:fetch_keys(StateData#state.host_opts)),
|
fun (H) ->
|
||||||
{next_state, stream_established, StateData};
|
ejabberd_router:register_route(H, ?MYNAME),
|
||||||
%% case dict:find(StateData#state.host, StateData#state.host_opts) of
|
?INFO_MSG("Route registered for service ~p~n",
|
||||||
%% {ok, Password} ->
|
[H]),
|
||||||
%% case p1_sha:sha(<<(StateData#state.streamid)/binary,
|
ejabberd_hooks:run(component_connected, [H])
|
||||||
%% Password/binary>>) of
|
end, dict:fetch_keys(StateData#state.host_opts)),
|
||||||
%% Digest ->
|
{next_state, stream_established, StateData};
|
||||||
%% send_element(StateData, #handshake{}),
|
_ ->
|
||||||
%% lists:foreach(
|
send_element(StateData, xmpp:serr_not_authorized()),
|
||||||
%% fun (H) ->
|
{stop, normal, StateData}
|
||||||
%% ejabberd_router:register_route(H, ?MYNAME),
|
end;
|
||||||
%% ?INFO_MSG("Route registered for service ~p~n",
|
_ ->
|
||||||
%% [H]),
|
send_element(StateData, xmpp:serr_not_authorized()),
|
||||||
%% ejabberd_hooks:run(component_connected, [H])
|
{stop, normal, StateData}
|
||||||
%% end, dict:fetch_keys(StateData#state.host_opts)),
|
end;
|
||||||
%% {next_state, stream_established, StateData};
|
|
||||||
%% _ ->
|
|
||||||
%% send_element(StateData, xmpp:serr_not_authorized()),
|
|
||||||
%% {stop, normal, StateData}
|
|
||||||
%% end;
|
|
||||||
%% _ ->
|
|
||||||
%% send_element(StateData, xmpp:serr_not_authorized()),
|
|
||||||
%% {stop, normal, StateData}
|
|
||||||
%% end;
|
|
||||||
wait_for_handshake({xmlstreamend, _Name}, StateData) ->
|
wait_for_handshake({xmlstreamend, _Name}, StateData) ->
|
||||||
{stop, normal, StateData};
|
{stop, normal, StateData};
|
||||||
wait_for_handshake({xmlstreamerror, _}, StateData) ->
|
wait_for_handshake({xmlstreamerror, _}, StateData) ->
|
||||||
|
|
Loading…
Reference in New Issue
Block a user