]> granicus.if.org Git - ejabberd/commitdiff
Cosmetic change: Set CSI state 'active' on resume
authorHolger Weiss <holger@zedat.fu-berlin.de>
Fri, 5 Aug 2016 18:09:52 +0000 (20:09 +0200)
committerHolger Weiss <holger@zedat.fu-berlin.de>
Fri, 5 Aug 2016 18:09:52 +0000 (20:09 +0200)
The CSI state is always set to 'active' when a stream management session
is resumed; so there's no need to apply the CSI state of the old c2s
process, first.

src/ejabberd_c2s.erl

index 74b78512ac869ad2c64835163acdbe44545ab6d0..ddbe5602344907d9a159dd21cbec886c30724b3b 100644 (file)
@@ -2800,8 +2800,7 @@ handle_resume(StateData, Attrs) ->
                       #xmlel{name = <<"r">>,
                              attrs = [{<<"xmlns">>, AttrXmlns}],
                              children = []}),
-         FlushedState = csi_flush_queue(NewState),
-         NewStateData = FlushedState#state{csi_state = active},
+         NewStateData = csi_flush_queue(NewState),
          ?INFO_MSG("Resumed session for ~s",
                    [jid:to_string(NewStateData#state.jid)]),
          {ok, NewStateData};
@@ -3048,13 +3047,13 @@ inherit_session_state(#state{user = U, server = S} = StateData, ResumeID) ->
                                           pres_timestamp = OldStateData#state.pres_timestamp,
                                           privacy_list = OldStateData#state.privacy_list,
                                           aux_fields = OldStateData#state.aux_fields,
-                                          csi_state = OldStateData#state.csi_state,
                                           mgmt_xmlns = OldStateData#state.mgmt_xmlns,
                                           mgmt_queue = OldStateData#state.mgmt_queue,
                                           mgmt_timeout = OldStateData#state.mgmt_timeout,
                                           mgmt_stanzas_in = OldStateData#state.mgmt_stanzas_in,
                                           mgmt_stanzas_out = OldStateData#state.mgmt_stanzas_out,
-                                          mgmt_state = active}};
+                                          mgmt_state = active,
+                                          csi_state = active}};
                  {error, Msg} ->
                      {error, Msg};
                  _ ->