Kim Alvefur
45a8e8ea7f
mod_s2s: Distinguish between high and low level errors in bounces
...
`remote-server-not-found` is reported for problems occurring without a
reply `<stream>` having been opened, e.g. DNS records were not found or
no TCP stream could be established to a functioning XMPP entity.
`remote-server-timeout` is reported for problems that occurring after a
stream has been opened, such as configuration problems, inability to
perform TLS or unsuccessful certificate validation.
Related: #770
7 years ago
Kim Alvefur
bf79ad07b2
net.adns: Remove unused local [luacheck]
7 years ago
Kim Alvefur
2fb3c3041d
net.websocket: Fix log call to pass data via format string instead of concatenation
7 years ago
Kim Alvefur
75bfec7731
net.*: Remove tostring call from logging
...
Taken care of by loggingmanager now
7 years ago
Kim Alvefur
40b1e3e0ed
plugins: Remove tostring call from logging
...
Taken care of by loggingmanager now
Mass-rewrite using lua pattern like `tostring%b()`
7 years ago
Kim Alvefur
0e16eeb216
util.session: Remove tostring call from logging
...
Taken care of by loggingmanager now
7 years ago
Kim Alvefur
358ade2979
util.sql: Remove tostring call from logging
...
Taken care of by loggingmanager now
7 years ago
Kim Alvefur
57b3a1dc87
util.startup: Remove tostring call from logging
...
Taken care of by loggingmanager now
7 years ago
Kim Alvefur
e3276738b3
core.portmanager: Remove unused local [luacheck]
7 years ago
Kim Alvefur
73beabd065
core.portmanager: Remove tostring call from logging
...
Taken care of by loggingmanager now
7 years ago
Kim Alvefur
8a87b70092
core.sessionmanager: Remove tostring call from logging
...
Taken care of by loggingmanager now
7 years ago
Kim Alvefur
d7770bba84
core.stanza_router: Remove tostring call from logging
...
Taken care of by loggingmanager now
7 years ago
Kim Alvefur
7bce7c9fbe
core.s2smanager: Rewrite log line to use formatting instead of concatenation
...
Makes it more in line with logging elsewhere. Potentially avoids or at
least delays creation of new string.
7 years ago
Kim Alvefur
cc653ef0d9
core.s2smanager: Remove use of tostring in logging
...
This is now performed by loggingmanager
7 years ago
Kim Alvefur
ab82920e54
util.error: Add tests
7 years ago
Kim Alvefur
56b07603dd
util.array: Add tests
7 years ago
Kim Alvefur
9df663276b
mod_limits: Use rate limiting in net.server if provided
...
This should be simpler and more efficient, as well avoid problems caused
by using filters.
7 years ago
Kim Alvefur
5c48dbda51
server_epoll: Add native support for per socket bandwith limits
10 years ago
Kim Alvefur
715cc27ea2
Merge 0.11->trunk
7 years ago
Kim Alvefur
d8ab361f15
util.poll: Add missing return statements in fallback mode
...
These allowed modifying or deleting select() state for unregistered FDs.
During normal usage this should never happen. Modifying one that isn't
set might cause weirdness but deleting an already deleted FD isn't a
problem.
7 years ago
Kim Alvefur
9e57e02797
mod_admin_telnet: Use already generated session id
...
Don't need to construct it from components again
7 years ago
Kim Alvefur
49b3e1479c
mod_admin_telnet: Allow specifying a reason when closing sessions ( #1400 )
7 years ago
Kim Alvefur
1e86443ee7
util.xmppstream: Inherit xml:lang from stream to stanzas ( fixes #1401 )
7 years ago
Kim Alvefur
ad9b431b8c
net.server_epoll: Remove unused local [luacheck]
7 years ago
Kim Alvefur
3ecb639c71
mod_pubsub: Eliminate dead code
...
`data` is a stanza and always truthy
7 years ago
Kim Alvefur
0cd5fc425d
net.server_epoll: Overhaul logging with one log sink per connection
7 years ago
Kim Alvefur
e6a6668fb5
net.server_epoll: Deprecate libevent emulation layer
7 years ago
Kim Alvefur
a8db3548e4
mod_admin_telnet: Add xmpp:ping to help
7 years ago
Kim Alvefur
1ede2571be
mod_admin_telnet: Add c2s:count() to help
7 years ago
Kim Alvefur
54e39ab881
mod_admin_telnet: Make c2s:count() consistent with c2s:show()
...
Both now operate on the same complete set of c2s sessions
7 years ago
Kim Alvefur
65b25e80b0
mod_admin_telnet: Factor out function for collecting all c2s sessions for easier reuse
7 years ago
Kim Alvefur
3effd36ff0
mod_admin_telnet: Include both c2s connections and sessions in c2s:show()
...
This way both incomplete connections and hibernating c2s sessions are shown.
7 years ago
Kim Alvefur
d9649edc2c
net.server_epoll: Return errors from creating sockets
...
Prevents error from attempting to index nil conn on such failure.
Silences luacheck warning about the 'err' variable being unused
7 years ago
Kim Alvefur
3204f55be1
mod_websocket: Clone stanza before mutating ( fixes #1398 )
...
Checking for `stanza.attr.xmlns == nil` to determine if the stanza
object is an actual stanza (`<message>`, `<presence>` or `<iq>` in the
`jabber:client` or `jabbber:server` namespace) or some other stream
element.
Since this mutation is not reverted, it may leak to other places and
cause them to mistreat stanzas as stream elements. Especially in cases
like MUC where a single stanza is broadcast to many recipients.
7 years ago
Kim Alvefur
e081fd6642
util.serialization: Cache default serialization instance ( fixes #1389 )
...
Most serialization uses still use the default serialize() and thus
duplicate much of the setup, which negates some of the performance
improvements of the rewrite.
7 years ago
Kim Alvefur
70e3e96c02
net.server_epoll: Backport timer optimization 6c2370f17027 from trunk (see #1388 )
...
The previous timer handling did not scale well and led to high CPU usage
with many connections (each with at least an read timeout).
7 years ago
Kim Alvefur
0b32ffe859
scansion/blocking: Remove the right irrelevant thing
7 years ago
Kim Alvefur
438982da4c
mod_blocklist: Remove unrelated tags from test case
7 years ago
Kim Alvefur
1f827c7df8
mod_blocklist: Trigger resend of presence when unblocking a contact ( fixes #1380 )
7 years ago
Kim Alvefur
2ab9c22c26
mod_blocklist: Update test case with correct behavior (see #1380 )
...
Expect failure
7 years ago
Kim Alvefur
1e2c3cdc46
mod_blocklist: Add test case capturing current behavior
7 years ago
Kim Alvefur
1cc4ec5d80
mod_pep: Revert 045209b41b3a, caused a regression
...
Adding in all presence based subscriptions in the broadcaster caused
resend_last_item() to unintentionally send out more notifications than
it should have.
7 years ago
Kim Alvefur
c2576aea62
util.sql: Ignore if tables and indices already exist on creation ( fixes #1064 )
...
Tested with SQLite3 3.16.2 and 3.27.2 and Postgres 11.
MySQL does not support IF NOT EXISTS for indices so not handled here.
7 years ago
Kim Alvefur
cabd5216b4
mod_pep: Handle presence based subscription outside of util.pubsub ( fixes #1372 )
...
Subscriptions were updated for each incoming presence stanza from
contacts. Each subscription change triggered a configuration save, which
would filter out the presence based subscriptions and usually end up
replacing the existing data with identical data. With many subscribed
nodes this adds up to a fair bit of IO bound work that is avoided by
keeping them separate.
7 years ago
Kim Alvefur
5cc63a416a
mod_muc_mam: Cache last date that archive owner has messages to reduce writes ( fixes #1368 )
7 years ago
Kim Alvefur
f11e984c30
mod_mam: Cache last date that archive owner has messages to reduce writes ( fixes #1368 )
7 years ago
Kim Alvefur
3bf9f59c00
mod_announce: Check for admin on current virtualhost instead of global ( fixes #1365 ) (thanks yc)
7 years ago
Kim Alvefur
2b596d7bd6
net.server_epoll: Add experimental option to close connections in case of listener error
...
Sometimes such errors leave sessions in an inconsistent state, so it
might be better to close them early.
7 years ago
Kim Alvefur
d06300c456
net.server_epoll: Return listener error message
7 years ago
Kim Alvefur
41c458eac5
mod_mam: Report correct count of results for forward queries
...
#results is only correct for backwards queries, the table is unused for
forward queries.
7 years ago