26
1
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:
Holger Weiss 2016-06-21 23:17:17 +02:00
parent 7ddeac38b6
commit c928956d73

View File

@ -1768,8 +1768,7 @@ terminate(_Reason, StateName, StateData) ->
StateData#state.resource, StateData#state.resource,
<<"Replaced by new connection">>), <<"Replaced by new connection">>),
presence_broadcast(StateData, From, presence_broadcast(StateData, From,
StateData#state.pres_a, Packet), StateData#state.pres_a, Packet);
handle_unacked_stanzas(StateData);
_ -> _ ->
?INFO_MSG("(~w) Close session for ~s", ?INFO_MSG("(~w) Close session for ~s",
[StateData#state.socket, [StateData#state.socket,
@ -1805,9 +1804,9 @@ terminate(_Reason, StateName, StateData) ->
Info); Info);
_ -> _ ->
ok ok
end, end
handle_unacked_stanzas(StateData)
end, end,
handle_unacked_stanzas(StateData),
bounce_messages(); bounce_messages();
true -> true ->
ok ok
@ -2609,9 +2608,9 @@ stream_mgmt_enabled(#state{mgmt_state = disabled}) ->
stream_mgmt_enabled(_StateData) -> stream_mgmt_enabled(_StateData) ->
true. true.
dispatch_stream_mgmt(El, StateData) dispatch_stream_mgmt(El, #state{mgmt_state = MgmtState} = StateData)
when StateData#state.mgmt_state == active; when MgmtState == active;
StateData#state.mgmt_state == pending -> MgmtState == pending ->
perform_stream_mgmt(El, StateData); perform_stream_mgmt(El, StateData);
dispatch_stream_mgmt(El, StateData) -> dispatch_stream_mgmt(El, StateData) ->
negotiate_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]), [jid:to_string(StateData#state.jid), H, NumStanzasOut]),
mgmt_queue_drop(StateData, H). mgmt_queue_drop(StateData, H).
update_num_stanzas_in(StateData, El) update_num_stanzas_in(#state{mgmt_state = MgmtState} = StateData, El)
when StateData#state.mgmt_state == active; when MgmtState == active;
StateData#state.mgmt_state == pending -> MgmtState == pending ->
NewNum = case {is_stanza(El), StateData#state.mgmt_stanzas_in} of NewNum = case {is_stanza(El), StateData#state.mgmt_stanzas_in} of
{true, 4294967295} -> {true, 4294967295} ->
0; 0;
@ -2859,10 +2858,10 @@ check_queue_length(#state{mgmt_queue = Queue,
StateData StateData
end. end.
handle_unacked_stanzas(StateData, F) handle_unacked_stanzas(#state{mgmt_state = MgmtState} = StateData, F)
when StateData#state.mgmt_state == active; when MgmtState == active;
StateData#state.mgmt_state == pending; MgmtState == pending;
StateData#state.mgmt_state == timeout -> MgmtState == timeout ->
Queue = StateData#state.mgmt_queue, Queue = StateData#state.mgmt_queue,
case queue:len(Queue) of case queue:len(Queue) of
0 -> 0 ->
@ -2882,10 +2881,10 @@ handle_unacked_stanzas(StateData, F)
handle_unacked_stanzas(_StateData, _F) -> handle_unacked_stanzas(_StateData, _F) ->
ok. ok.
handle_unacked_stanzas(StateData) handle_unacked_stanzas(#state{mgmt_state = MgmtState} = StateData)
when StateData#state.mgmt_state == active; when MgmtState == active;
StateData#state.mgmt_state == pending; MgmtState == pending;
StateData#state.mgmt_state == timeout -> MgmtState == timeout ->
ResendOnTimeout = ResendOnTimeout =
case StateData#state.mgmt_resend of case StateData#state.mgmt_resend of
Resend when is_boolean(Resend) -> Resend when is_boolean(Resend) ->