Commit graph

72 commits

Author SHA1 Message Date
Kim Alvefur
38c98346b1 mod_csi_simple: Tweak check for <body>
There were code that checked the body for mentions but isn't included.
2019-01-06 21:03:09 +01:00
Kim Alvefur
a24712e845 mod_csi: Set session.state to simplify CSI modules
Moved here from mod_csi_simple
2018-11-27 19:34:21 +01:00
Kim Alvefur
64b9b5a758 mod_csi_simple: Fix autocompletion mistake 2018-11-27 19:15:33 +01:00
Kim Alvefur
1796f20abc mod_csi_simple: Bypass importance event in active mode (fixes #1249) 2018-11-27 19:05:11 +01:00
Kim Alvefur
0db6c3f669 mod_csi_simple: Don't set <delay> stamps on <iq> stanzas (fixes #1248) 2018-11-27 18:56:22 +01:00
Kim Alvefur
ad38cc8fbe mod_csi_simple: Use the same event name when firing as when hooking (fixes #1245) 2018-11-25 14:47:36 +01:00
Kim Alvefur
3d3e0fa082 mod_csi_simple: Consider non-stanza objects important
Most cases are for keepalive or stream closing, where it needs to be
flushed anyways.
2018-11-17 15:36:10 +01:00
Kim Alvefur
23be1afef6 mod_csi_simple: Skip delay tags on objects other than stanzas (thanks quest)
This may be triggered by sending strings, eg as done by mod_c2s for
keepalives, stream errors, "</stream>".
2018-11-17 15:28:49 +01:00
Kim Alvefur
61151d4d82 mod_csi_simple: Import modified version of mod_csi_pump from prosody-modules 2018-10-29 21:15:38 +01:00
Kim Alvefur
6fcaa64f61 mod_csi_simple: Disable optimizations on disconnect (fixes #1358)
The connection becomes invalid here, regardless of 3rd party modules
that might keep the session alive.
2019-05-26 15:04:16 +02:00
Kim Alvefur
096ebc3bcf mod_csi_simple: Include queue size in debug messages 2019-03-25 15:20:28 +01:00
Matthew Wild
5074566d79 mod_csi_simple: Fix type in function name 2019-03-25 10:32:39 +00:00
Kim Alvefur
ba9e505924 mod_csi_simple: Improve debug logs by mentioing why the buffer gets flushed 2019-03-24 22:01:36 +01:00
Kim Alvefur
684a26f5be mod_csi_simple: Add some debug logging 2019-03-24 20:53:49 +01:00
Kim Alvefur
e887ed5cad mod_csi_simple: Disable optimizations on unload and re-enable on load 2019-03-24 20:43:15 +01:00
Kim Alvefur
1e77bb6ed2 mod_csi_simple: Separate out functions to enable/disable optimizations
This allows reusing this logic outside the events. Letting the functions
be module globals makes it easier to access from eg the telnet console.
2019-03-24 20:41:25 +01:00
Kim Alvefur
6c89a86e0d mod_csi_simple: Remove old "pump" queue/buffer method, handled in net.server now 2019-03-24 20:22:01 +01:00
Kim Alvefur
3a1498ebd3 mod_csi_simple: Also flush buffer in "pump" mode 2019-03-24 19:02:40 +01:00
Kim Alvefur
141c5d3fbe mod_csi_simple: Trigger buffer flush on seeing incoming data
I.e. the client sent us something, which means its network / radio is
active.
2019-03-24 18:58:53 +01:00
Kim Alvefur
643c317b16 mod_csi_simple: Count buffered items and flush when it reaches configured limit
In this mode, stanzas have been serialized to strings in the internal
net.server buffer, so it is difficult to count them after the fact.
2019-03-24 18:33:38 +01:00
Kim Alvefur
e5885c928a mod_csi_simple: Break out stanza timestamping into a function for future reuse 2019-03-24 18:32:50 +01:00
Kim Alvefur
8e68b0dd1a mod_csi_simple: Use write locks in net.server if available 2018-11-24 02:25:44 +01:00