aboutsummaryrefslogtreecommitdiff
path: root/src/mod_stream_mgmt.erl (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add details about XEP implementations to some protocol attributesBadlop2022-11-071-1/+1
|
* Update copyright year to 2022Badlop2022-02-111-1/+1
|
* Fix typosKian-Meng Ang2022-01-241-1/+1
|
* Update documentation to match the implemented options values (#3675)Badlop2021-09-141-1/+3
|
* Use specific syntax so modules and top-level will be linksBadlop2021-08-231-3/+3
| | | | | | If we use _`whatever`_ here in ejabberd man pages, it is converted to *`whatever`* in markdown, and docs.ejabberd.im/Makefile converts to the proper links
* Update newest copyright year to 2021 (#3464)Badlop2021-01-271-1/+1
|
* Use include_lib() to include headers from dependencies (#3369)Stu Tomlinson2020-09-031-2/+2
|
* mod_stream_mgmt: Don't kill new PID on resumptionHolger Weiss2020-06-011-35/+51
| | | | | | | | | | | | | | | | | | | During XEP-0198 resumption, the ejabberd_c2s process that handles the new connection reopens the ejabberd_sm session of the old one. Since commit b4770815c0b0416c21d01507d2908f94c25b3097, the new process adds the new session table entry before the old process removes the old one. While adding the new one, ejabberd_sm checks for old sessions to replace. This check assumes old SIDs compare lower than new ones. This assumption didn't necessarily hold for the session resumption case, where the old SID's timestamp was copied over to the new SID and only the PID was updated. Therefore, the new process was killed if the new PID happened to be smaller than the old one. Fix this by having mod_stream_mgmt use its own SM-ID rather than copying over the old SID's timestamp to the new SID. Thanks to Thilo Molitor and Friedrich Altheide for reporting the issue, and to Thomas Leister for his help with debugging it.
* Resending unacked stanzas should send even archived msgs if mod_offline is ↵Paweł Chmielowski2020-04-161-14/+16
| | | | | | | | enabled Messages that are received when no c2s is active will be stored in offline, even when mam archived them, so i don't think we should be doing something different in this case.
* Make resumed sessions try to deliver possibly queued messages to new sessionPaweł Chmielowski2020-04-071-2/+17
| | | | | | | Between receiving resume request and being closed by new session, it's possible (even if not very likely) that new messages would arrive to process that is resumed. In that case try to reroute messages that were received after we sent resume reply to new process.
* Fix potential message loss in terminating c2s sessionsPaweł Chmielowski2020-04-011-6/+9
| | | | | | | | | | Calling sync version of xmpp_stream_in/out:stop could lead to messages never being processed by c2s process if they were queued in p1_server. This could be reproduced by when having messages in offline storage, starting sessions, enabling stream_mgmt, sending initial presence, and then immediately </stream:stream>, messages that mod_offline would send process would not be bounced back by stream_mgmt.
* Update copyright to 2020 (#3149)Badlop2020-01-281-1/+1
|
* mod_stream_mgmt: Don't crash on disabled ACK timerHolger Weiss2020-01-141-5/+11
| | | | | | | Don't attempt to start an ACK timer if 'ack_timeout' is set to 'infinity'. Thanks to Ingo Jürgensmann for reporting the bug.
* Generate ejabberd.yml.5 man page from source code directlyEvgeny Khramtsov2020-01-081-0/+80
| | | | | | | Several documentation callbacks (doc/0 and mod_doc/0) are implemented and `ejabberdctl man` command is added to generate a man page. Note that the command requires a2x to be installed (which is a part of asciidoc package).
* Correctly handle unicode in log messagesEvgeny Khramtsov2019-09-231-18/+18
|
* Don't use close/2: set stop_reason explicitlyEvgeny Khramtsov2019-08-081-2/+3
| | | | Fixes #2984
* Report connection error before waiting for resumptionEvgeny Khramtsov2019-08-061-11/+22
| | | | In other words don't hide the reason why c2s connection has failed
* Also catch 'shutdown' exit reasonEvgeny Khramtsov2019-07-301-0/+2
|
* Improve pattern matchingEvgeny Khramtsov2019-07-301-1/+1
|
* Fix race condition when deleting c2s session recordEvgeny Khramtsov2019-07-301-1/+2
|
* Fix previous commitEvgeny Khramtsov2019-07-301-2/+2
|
* Correctly report resume timeoutEvgeny Khramtsov2019-07-301-2/+3
|
* Fix default value of resume_timeoutEvgeny Khramtsov2019-07-251-1/+1
|
* mod_stream_mgmt: Allow flexible timeout formatHolger Weiss2019-07-231-5/+8
| | | | | Adjust mod_stream_mgmt and the related code in mod_push_keepalive to support the flexible timeout format.
* Ignore late arrival of an already cancelled timerEvgeny Khramtsov2019-07-081-0/+6
|
* Avoid last handled stanzas cache to grow indefinitelyEvgeny Khramtsov2019-07-011-3/+7
|
* Avoid using broad p1_queue:queue() type wherever possibleEvgeny Khramtsov2019-06-281-1/+2
|
* Fix type specsEvgeny Khramtsov2019-06-271-1/+1
|
* Make sure queue bouncing doesn't yield into infinite recursionEvgeny Khramtsov2019-06-261-11/+2
|
* Use proper loglevel to log resumption failuresEvgeny Khramtsov2019-06-251-16/+47
|
* Don't propagate downstream already handled messageEvgeny Khramtsov2019-06-251-1/+1
|
* Make logging messages more consistentEvgeny Khramtsov2019-06-241-1/+1
|
* Improve extraction of translated stringsEvgeny Khramtsov2019-06-221-17/+18
| | | | | | | | | | | | | Now every such string MUST be encapsulated into ?T() macro. The macro itself is defined in include/translate.hrl. Example: -module(foo). -export([bar/1]). -include("translate.hrl"). bar(Lang) -> translate:translate(Lang, ?T("baz")).
* Get rid of "well-known" typeEvgeny Khramtsov2019-06-151-2/+2
|
* Use new configuration validatorEvgeny Khramtsov2019-06-141-54/+20
|
* mod_stream_mgmt: Drop unused codeHolger Weiss2019-05-291-25/+13
| | | | | | Revert the changes applied to mod_stream_mgmt in commit b76f90fe396ee7a1ed5c5f7006431879929fc2a1, as the new implementation of mod_offline's 'use_mam_for_storage' feature doesn't need them.
* Add mod_offline option for fetching data from mam instead of from spool tablePaweł Chmielowski2019-04-261-13/+25
| | | | | | | | | | | This commit introduces `use_mam_for_storage` option that take boolean argument. Enabling it will make mod_offline not use spool table for storing offline message, but instead will use mam archive to retrieve messages stored when offline. Enabling this option have couple drawback currently, only messages that were stored in mam will be available, most of flexible message retrieval queries don't work (those that allow retrieval/deletion of messages by id).
* Replace code using p1_time_compat wrapper with native functionsPaweł Chmielowski2019-02-271-1/+1
| | | | | | | Since we now require R19, we shouldn't need that anymore. There are still couple places where p1_time_compat:unique_timestamp() is used as there is no direct equivalent.
* Update copyright to 2019 (#2756)Badlop2019-01-081-1/+1
|
* Apply new cache options on mod_stream_mgmt reloadEvgeny Khramtsov2018-11-301-1/+2
|
* Keep last handled stanzas number in cache rather than session tableEvgeny Khramtsov2018-11-301-26/+49
|
* Move some functions from xmpp back into ejabberdHolger Weiss2018-10-251-1/+1
|
* Switch more log message to warning levelEvgeny Khramtsov2018-09-191-2/+2
| | | | | The commit is supposed to improve logging at loglevel 3, which is the recommended level for high loaded ejabberd servers
* Move cancel_timer/1 function into 'misc' moduleHolger Weiss2018-07-171-13/+2
|
* mod_stream_mgmt: Remove dead case clausesHolger Weiss2018-07-101-6/+0
|
* mod_stream_mgmt: Add descriptive text to errorsHolger Weiss2018-07-101-2/+7
| | | | Closes #2485.
* Don't crash on most common gen_server:call errorsEvgeniy Khramtsov2018-07-011-0/+2
|
* Don't use 'unsupported-version' inside SM <failed/> elementEvgeniy Khramtsov2018-06-251-4/+9
| | | | | | | | This error condition is defined within stream errors, however, XEP-0198 says: > This element SHOULD contain an error condition, which MUST > be one of the **stanza** error conditions defined in RFC 6120.
* Get rid of ejabberd.hrl headerEvgeniy Khramtsov2018-06-141-1/+0
| | | | | | | | | The header consisted of too many unrelated stuff and macros misuse. Some stuff is moved into scram.hrl and type_compat.hrl. All macros have been replaced with the corresponding function calls. TODO: probably type_compat.hrl is not even needed anymore since we support only Erlang >= OTP 17.5
* mod_push_keepalive: Reset timeout on messages onlyHolger Weiss2018-04-171-3/+18
| | | | | | Some mobile apps might only be notified on actual chat messages with a body, so don't let mod_push_keepalive reset the stream management timeout on other types of traffic.