Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xep 0352 csi #703

Merged
merged 29 commits into from Apr 11, 2016
Merged

Xep 0352 csi #703

merged 29 commits into from Apr 11, 2016

Conversation

michalwski
Copy link
Contributor

This PR addresses #680

Proposed changes include:

  • changes to ejabberd_c2s handling inactive and active states
  • new xep_0352_csi_SUITE

TODO:

  • documentation (also how this works with sm enabled)
  • tests with stream management enabled

@@ -857,13 +859,25 @@ session_established({xmlstreamelement,
stream_mgmt_handle_ack(session_established, El, StateData);

session_established({xmlstreamelement,
#xmlel{name = <<"r">>} = El}, StateData) ->
#xmlel{name = <<"r">>} = El},
#state{csi_state = active} = StateData) ->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space

@studzien
Copy link
Contributor

Does it make sense to buffer the incoming stanzas as well?
The XEP leaves freedom of choice for the server implementors, but what if...

  • the client sends a message right after sending the nonza. Do we still want to deliver and archive this message ASAP or when the client becomes active again (possibly in a month)?
  • the client sends an IQ right after sending the same nonza. Do we want to send the result at time of sending or becoming active again?

I think that the main problem is that the XEP specifies almost nothing, especially not what should with stanzas sent by the client when it is inactive.

@studzien
Copy link
Contributor

Also, I believe that buffer size should be configurable from the config file.

@michalwski
Copy link
Contributor Author

I've sent a message to xmpp standards mailing list. Here's the thread: http://mail.jabber.org/pipermail/standards/2016-March/031012.html.

My personal opinion after re-thinking is that the server should discard the stanza and reply with an error to the client.

@michalwski
Copy link
Contributor Author

Based on the conversation on the standrads mailing list I decided not to buffer incoming stanzas, but pass as usual.

@@ -870,6 +870,7 @@ do_open_session_common(JID, #state{user = U, resource = R} = NewStateData0) ->
privacy_list = PrivList},
fsm_next_state_pack(session_established,
NewStateData).
-define(xmlel(Name), #xmlel{name = Name}).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unused macro

@chrzaszcz chrzaszcz merged commit 59b1d7c into rel-1.7 Apr 11, 2016
@chrzaszcz chrzaszcz deleted the xep-0352-csi branch April 11, 2016 11:22
@michalwski michalwski mentioned this pull request Apr 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants