mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-26 17:38:45 +01:00
XEP-0198: Apply cosmetic changes
This commit is contained in:
parent
7ddeac38b6
commit
c928956d73
@ -1768,8 +1768,7 @@ terminate(_Reason, StateName, StateData) ->
|
||||
StateData#state.resource,
|
||||
<<"Replaced by new connection">>),
|
||||
presence_broadcast(StateData, From,
|
||||
StateData#state.pres_a, Packet),
|
||||
handle_unacked_stanzas(StateData);
|
||||
StateData#state.pres_a, Packet);
|
||||
_ ->
|
||||
?INFO_MSG("(~w) Close session for ~s",
|
||||
[StateData#state.socket,
|
||||
@ -1805,9 +1804,9 @@ terminate(_Reason, StateName, StateData) ->
|
||||
Info);
|
||||
_ ->
|
||||
ok
|
||||
end,
|
||||
handle_unacked_stanzas(StateData)
|
||||
end
|
||||
end,
|
||||
handle_unacked_stanzas(StateData),
|
||||
bounce_messages();
|
||||
true ->
|
||||
ok
|
||||
@ -2609,9 +2608,9 @@ stream_mgmt_enabled(#state{mgmt_state = disabled}) ->
|
||||
stream_mgmt_enabled(_StateData) ->
|
||||
true.
|
||||
|
||||
dispatch_stream_mgmt(El, StateData)
|
||||
when StateData#state.mgmt_state == active;
|
||||
StateData#state.mgmt_state == pending ->
|
||||
dispatch_stream_mgmt(El, #state{mgmt_state = MgmtState} = StateData)
|
||||
when MgmtState == active;
|
||||
MgmtState == pending ->
|
||||
perform_stream_mgmt(El, StateData);
|
||||
dispatch_stream_mgmt(El, StateData) ->
|
||||
negotiate_stream_mgmt(El, StateData).
|
||||
@ -2802,9 +2801,9 @@ check_h_attribute(#state{mgmt_stanzas_out = NumStanzasOut} = StateData, H) ->
|
||||
[jid:to_string(StateData#state.jid), H, NumStanzasOut]),
|
||||
mgmt_queue_drop(StateData, H).
|
||||
|
||||
update_num_stanzas_in(StateData, El)
|
||||
when StateData#state.mgmt_state == active;
|
||||
StateData#state.mgmt_state == pending ->
|
||||
update_num_stanzas_in(#state{mgmt_state = MgmtState} = StateData, El)
|
||||
when MgmtState == active;
|
||||
MgmtState == pending ->
|
||||
NewNum = case {is_stanza(El), StateData#state.mgmt_stanzas_in} of
|
||||
{true, 4294967295} ->
|
||||
0;
|
||||
@ -2859,10 +2858,10 @@ check_queue_length(#state{mgmt_queue = Queue,
|
||||
StateData
|
||||
end.
|
||||
|
||||
handle_unacked_stanzas(StateData, F)
|
||||
when StateData#state.mgmt_state == active;
|
||||
StateData#state.mgmt_state == pending;
|
||||
StateData#state.mgmt_state == timeout ->
|
||||
handle_unacked_stanzas(#state{mgmt_state = MgmtState} = StateData, F)
|
||||
when MgmtState == active;
|
||||
MgmtState == pending;
|
||||
MgmtState == timeout ->
|
||||
Queue = StateData#state.mgmt_queue,
|
||||
case queue:len(Queue) of
|
||||
0 ->
|
||||
@ -2882,10 +2881,10 @@ handle_unacked_stanzas(StateData, F)
|
||||
handle_unacked_stanzas(_StateData, _F) ->
|
||||
ok.
|
||||
|
||||
handle_unacked_stanzas(StateData)
|
||||
when StateData#state.mgmt_state == active;
|
||||
StateData#state.mgmt_state == pending;
|
||||
StateData#state.mgmt_state == timeout ->
|
||||
handle_unacked_stanzas(#state{mgmt_state = MgmtState} = StateData)
|
||||
when MgmtState == active;
|
||||
MgmtState == pending;
|
||||
MgmtState == timeout ->
|
||||
ResendOnTimeout =
|
||||
case StateData#state.mgmt_resend of
|
||||
Resend when is_boolean(Resend) ->
|
||||
|
Loading…
Reference in New Issue
Block a user