prosody.git
9 years agoMerge 0.9->0.10
Kim Alvefur [Wed, 13 May 2015 20:31:59 +0000 (22:31 +0200)]
Merge 0.9->0.10

9 years agomod_s2s: Mark stream as opened directly after opening stream, prevents session.close...
Kim Alvefur [Wed, 13 May 2015 19:56:22 +0000 (21:56 +0200)]
mod_s2s: Mark stream as opened directly after opening stream, prevents session.close opening it again

9 years agomod_s2s: Don't cache session.sends2s (or do it later), prevents sending data after...
Kim Alvefur [Wed, 13 May 2015 19:55:08 +0000 (21:55 +0200)]
mod_s2s: Don't cache session.sends2s (or do it later), prevents sending data after session was closed

9 years agomod_s2s/s2sout: Use the local address assigned to UDP sockets instead of util.net...
Kim Alvefur [Wed, 13 May 2015 19:47:39 +0000 (21:47 +0200)]
mod_s2s/s2sout: Use the local address assigned to UDP sockets instead of util.net to enumerate possible source addresses

9 years agoutil.datamanager: Fix traceback from trying to purge when storage is empty or otherwi...
Kim Alvefur [Wed, 13 May 2015 19:44:13 +0000 (21:44 +0200)]
util.datamanager: Fix traceback from trying to purge when storage is empty or otherwise unaccessible (fixes #496)

9 years agomod_s2s/s2sout: Remove now unused config option dns_max_depth
Kim Alvefur [Wed, 13 May 2015 19:43:05 +0000 (21:43 +0200)]
mod_s2s/s2sout: Remove now unused config option dns_max_depth

9 years agoutil.queue: Small fast FIFO/ringbuffer/queue library
Matthew Wild [Wed, 13 May 2015 15:57:27 +0000 (16:57 +0100)]
util.queue: Small fast FIFO/ringbuffer/queue library

9 years agosessionmanager: Rename argument to avoid name clash with local variable [luacheck]
Matthew Wild [Wed, 6 May 2015 18:58:33 +0000 (19:58 +0100)]
sessionmanager: Rename argument to avoid name clash with local variable [luacheck]

9 years agosessionmanager: Rename unused loop variables to '_' [luacheck]
Matthew Wild [Wed, 6 May 2015 18:58:03 +0000 (19:58 +0100)]
sessionmanager: Rename unused loop variables to '_' [luacheck]

9 years agoutil.set: Rename method argument to avoid name clash [luacheck]
Matthew Wild [Wed, 6 May 2015 18:51:35 +0000 (19:51 +0100)]
util.set: Rename method argument to avoid name clash [luacheck]

9 years agoutil.set: Add luacheck annotation for methods not referencing 'self'
Matthew Wild [Wed, 6 May 2015 18:51:07 +0000 (19:51 +0100)]
util.set: Add luacheck annotation for methods not referencing 'self'

9 years agoutil.set: Remove unnecessary local declaration, arguments are already locals [luacheck]
Matthew Wild [Wed, 6 May 2015 18:50:40 +0000 (19:50 +0100)]
util.set: Remove unnecessary local declaration, arguments are already locals [luacheck]

9 years agoutil.dataforms: Rename unused loop counter to '_' [luacheck]
Matthew Wild [Wed, 6 May 2015 18:43:51 +0000 (19:43 +0100)]
util.dataforms: Rename unused loop counter to '_' [luacheck]

9 years agoutil.sslconfig: Rename variable to avoid name clash [luacheck]
Matthew Wild [Wed, 6 May 2015 18:43:28 +0000 (19:43 +0100)]
util.sslconfig: Rename variable to avoid name clash [luacheck]

9 years agoutil.serialization: Remove unused imports of error() and loadstring() [luacheck]
Matthew Wild [Wed, 6 May 2015 18:40:48 +0000 (19:40 +0100)]
util.serialization: Remove unused imports of error() and loadstring() [luacheck]

9 years agoutil.xml: Remove unused parameter (thanks, luacheck)
Matthew Wild [Wed, 6 May 2015 18:39:28 +0000 (19:39 +0100)]
util.xml: Remove unused parameter (thanks, luacheck)

9 years agoutil.dataforms: Remove unused import of pairs() (thanks luacheck)
Matthew Wild [Wed, 6 May 2015 18:38:29 +0000 (19:38 +0100)]
util.dataforms: Remove unused import of pairs() (thanks luacheck)

9 years ago.luacheckrc: Commit initial config for luacheck
Matthew Wild [Wed, 6 May 2015 18:35:35 +0000 (19:35 +0100)]
.luacheckrc: Commit initial config for luacheck

9 years agoMerge
Matthew Wild [Wed, 6 May 2015 18:21:29 +0000 (19:21 +0100)]
Merge

9 years agoutil.events: Add get_handlers() method
Matthew Wild [Wed, 6 May 2015 18:21:18 +0000 (19:21 +0100)]
util.events: Add get_handlers() method

9 years agoportmanager, s2smanager, sessionmanager, stanza_router, storagemanager, usermanager...
Matthew Wild [Wed, 6 May 2015 18:20:07 +0000 (19:20 +0100)]
portmanager, s2smanager, sessionmanager, stanza_router, storagemanager, usermanager, util.xml: Add luacheck annotations

9 years agorostermanager: Variable rename for clarity and to avoid name clash [luacheck]
Matthew Wild [Wed, 6 May 2015 18:17:59 +0000 (19:17 +0100)]
rostermanager: Variable rename for clarity and to avoid name clash [luacheck]

9 years agomodulemanager: Add luacheck annotations
Matthew Wild [Wed, 6 May 2015 18:16:16 +0000 (19:16 +0100)]
modulemanager: Add luacheck annotations

9 years agomodulemanager: Remove unused import of pcall #luacheck
Matthew Wild [Wed, 6 May 2015 18:15:35 +0000 (19:15 +0100)]
modulemanager: Remove unused import of pcall #luacheck

9 years agomoduleapi: Import util.stanza required for module:broadcast()
Matthew Wild [Wed, 6 May 2015 18:11:27 +0000 (19:11 +0100)]
moduleapi: Import util.stanza required for module:broadcast()

9 years agomoduleapi: Add luacheck annotation
Matthew Wild [Wed, 6 May 2015 18:02:44 +0000 (19:02 +0100)]
moduleapi: Add luacheck annotation

9 years agomoduleapi: Minor variable renaming to avoid clashes with the 'type' function
Matthew Wild [Wed, 6 May 2015 18:02:07 +0000 (19:02 +0100)]
moduleapi: Minor variable renaming to avoid clashes with the 'type' function

9 years agomoduleapi: Clear self.event_handlers when unhooking an event, to prevent leaks
Matthew Wild [Wed, 6 May 2015 18:01:16 +0000 (19:01 +0100)]
moduleapi: Clear self.event_handlers when unhooking an event, to prevent leaks

9 years agomoduleapi: module:measure_event(), module:measure_global_event(): Fix copy/paste...
Matthew Wild [Wed, 6 May 2015 18:00:05 +0000 (19:00 +0100)]
moduleapi: module:measure_event(), module:measure_global_event(): Fix copy/paste error

9 years agomoduleapi: Remove accidental use of undefined and unnecessary 'priority' variable
Matthew Wild [Wed, 6 May 2015 17:58:29 +0000 (18:58 +0100)]
moduleapi: Remove accidental use of undefined and unnecessary 'priority' variable

9 years agomoduleapi: Add module:broadcast() to send a stanza to a list of JIDs
Matthew Wild [Wed, 6 May 2015 17:37:46 +0000 (18:37 +0100)]
moduleapi: Add module:broadcast() to send a stanza to a list of JIDs

9 years agomod_s2s: Fire read timeout event on correct virtualhost for incoming connections
Kim Alvefur [Wed, 6 May 2015 11:35:34 +0000 (13:35 +0200)]
mod_s2s: Fire read timeout event on correct virtualhost for incoming connections

9 years agomod_pubsub: Add option for default affiliation of non-existent nodes (thanks Flow)
Kim Alvefur [Tue, 5 May 2015 10:21:32 +0000 (12:21 +0200)]
mod_pubsub: Add option for default affiliation of non-existent nodes (thanks Flow)

9 years agoutil.statistics: Collect duration sample even if run fewer times than the sample...
Kim Alvefur [Mon, 4 May 2015 22:48:55 +0000 (00:48 +0200)]
util.statistics: Collect duration sample even if run fewer times than the sample interval

9 years agoutil.events: Add local reference to table.remove (fixes traceback)
Kim Alvefur [Mon, 4 May 2015 22:41:39 +0000 (00:41 +0200)]
util.events: Add local reference to table.remove (fixes traceback)

9 years agoMerge 0.9->0.10
Kim Alvefur [Sun, 3 May 2015 16:38:39 +0000 (18:38 +0200)]
Merge 0.9->0.10

9 years agoutil.encodings: Move declarations to top of function [pedantic]
Kim Alvefur [Sat, 2 May 2015 12:52:51 +0000 (14:52 +0200)]
util.encodings: Move declarations to top of function [pedantic]

9 years agoutil.pposix: Return error from ftruncate if that fails too (but what would we do...
Kim Alvefur [Sat, 2 May 2015 12:41:56 +0000 (14:41 +0200)]
util.pposix: Return error from ftruncate if that fails too (but what would we do here?)

9 years agoutil.events: Change from nil to false to indicate adding a global wrapper
Matthew Wild [Tue, 28 Apr 2015 13:19:28 +0000 (14:19 +0100)]
util.events: Change from nil to false to indicate adding a global wrapper

9 years agomoduleapi: New methods for modules to conveniently wrap events
Matthew Wild [Tue, 28 Apr 2015 13:18:43 +0000 (14:18 +0100)]
moduleapi: New methods for modules to conveniently wrap events

9 years agomoduleapi: Experimental API for modules to measure the rate+duration of events
Matthew Wild [Tue, 28 Apr 2015 12:52:07 +0000 (13:52 +0100)]
moduleapi: Experimental API for modules to measure the rate+duration of events

9 years agoutil.events: Add support for event wrappers, functions which can wrap the calling...
Matthew Wild [Tue, 28 Apr 2015 12:42:59 +0000 (13:42 +0100)]
util.events: Add support for event wrappers, functions which can wrap the calling of event handlers to run code before/after an event (for debugging, statistics, logging purposes, etc.)

9 years agoprosodyctl: check certs: Correctly check that certificates are valid for s2s
Kim Alvefur [Mon, 27 Apr 2015 19:52:16 +0000 (21:52 +0200)]
prosodyctl: check certs: Correctly check that certificates are valid for s2s

9 years agoconfigure: Set default compiler and linker to cc and ld on *bsd (thanks Tobias)
Kim Alvefur [Sun, 26 Apr 2015 21:25:47 +0000 (23:25 +0200)]
configure: Set default compiler and linker to cc and ld on *bsd (thanks Tobias)

9 years agoconfigure: Mention openbsd preset in --help
Kim Alvefur [Sun, 26 Apr 2015 21:23:33 +0000 (23:23 +0200)]
configure: Mention openbsd preset in --help

9 years agonet.dns: Make sure argument to math.randomseed does not overflow a 32 bit *signed...
Kim Alvefur [Sun, 26 Apr 2015 17:50:24 +0000 (19:50 +0200)]
net.dns: Make sure argument to math.randomseed does not overflow a 32 bit *signed* int (blame Lua). Closes #439

9 years agoMerge 0.9->0.10
Kim Alvefur [Sat, 25 Apr 2015 22:06:44 +0000 (00:06 +0200)]
Merge 0.9->0.10

9 years agomod_c2s, mod_s2s: Collect statistics on number of connections
Kim Alvefur [Sat, 25 Apr 2015 22:06:11 +0000 (00:06 +0200)]
mod_c2s, mod_s2s: Collect statistics on number of connections

9 years agomod_blocklist: Some cleanup [luacheck]
Kim Alvefur [Sat, 25 Apr 2015 12:57:52 +0000 (14:57 +0200)]
mod_blocklist: Some cleanup [luacheck]

9 years agousermanager: Capitalize log message
Kim Alvefur [Sat, 25 Apr 2015 12:22:59 +0000 (14:22 +0200)]
usermanager: Capitalize log message

9 years agomod_admin_adhoc: Remove special treatment of the "pending" roster entry
Kim Alvefur [Sat, 25 Apr 2015 12:21:40 +0000 (14:21 +0200)]
mod_admin_adhoc: Remove special treatment of the "pending" roster entry

9 years agonet.dns, mod_s2s: Add chasing of CNAMEs to net.dns and remove it from mod_s2s
Kim Alvefur [Fri, 24 Apr 2015 12:14:01 +0000 (14:14 +0200)]
net.dns, mod_s2s: Add chasing of CNAMEs to net.dns and remove it from mod_s2s

9 years agorostermanager: Fix roster upgrade code (thanks mva)
Kim Alvefur [Sun, 5 Apr 2015 14:19:02 +0000 (16:19 +0200)]
rostermanager: Fix roster upgrade code (thanks mva)

9 years agorostermanager: Add missing import of `type()`
Florian Zeitz [Fri, 3 Apr 2015 19:42:30 +0000 (21:42 +0200)]
rostermanager: Add missing import of `type()`

9 years agoutil-src/*.c: Per convention call luaL_error() as argument to return
Florian Zeitz [Fri, 3 Apr 2015 18:30:14 +0000 (20:30 +0200)]
util-src/*.c: Per convention call luaL_error() as argument to return

9 years agosessionmanager: Rename parameter to avoid varible name conflict
Matthew Wild [Fri, 3 Apr 2015 18:31:05 +0000 (19:31 +0100)]
sessionmanager: Rename parameter to avoid varible name conflict

9 years agohostmanager: Rename variable to avoid shadowing 'type()' function
Matthew Wild [Fri, 3 Apr 2015 18:22:55 +0000 (19:22 +0100)]
hostmanager: Rename variable to avoid shadowing 'type()' function

9 years agologgingmanager: Improve code structure (removes empty if branch)
Matthew Wild [Fri, 3 Apr 2015 18:20:24 +0000 (19:20 +0100)]
loggingmanager: Improve code structure (removes empty if branch)

9 years agorostermanager: Remove unused parameter
Matthew Wild [Fri, 3 Apr 2015 18:13:35 +0000 (19:13 +0100)]
rostermanager: Remove unused parameter

9 years agoutil-src/*.c: astyle --indent=tab --brackets=attach --indent-switches --break-blocks...
Kim Alvefur [Fri, 3 Apr 2015 17:52:48 +0000 (19:52 +0200)]
util-src/*.c: astyle --indent=tab --brackets=attach --indent-switches --break-blocks --pad-oper --unpad-paren --add-brackets --align-pointer=type --lineend=linux

9 years agoutil.datamanager: Fix traceback due to %s in log message
Kim Alvefur [Fri, 3 Apr 2015 10:10:30 +0000 (12:10 +0200)]
util.datamanager: Fix traceback due to %s in log message

9 years agorostermanager, mod_roster, mod_presence: Move pending roster items to roster metadata...
Kim Alvefur [Fri, 3 Apr 2015 04:38:22 +0000 (06:38 +0200)]
rostermanager, mod_roster, mod_presence: Move pending roster items to roster metadata field

9 years agoprosodyctl: Use ssl.loadcertificate instead of ssl.x509.load, as the ssl.x509 export...
Kim Alvefur [Thu, 2 Apr 2015 12:31:41 +0000 (14:31 +0200)]
prosodyctl: Use ssl.loadcertificate instead of ssl.x509.load, as the ssl.x509 export dissapears in 97b1974 or 356e03a

9 years agoprosodyctl: Document magic commit ID
Paul Aurich [Wed, 1 Apr 2015 20:30:31 +0000 (13:30 -0700)]
prosodyctl: Document magic commit ID

9 years agoutil.table, Makefile: New C module that allows pre-allocation of tables to improve...
Matthew Wild [Tue, 31 Mar 2015 10:59:17 +0000 (11:59 +0100)]
util.table, Makefile: New C module that allows pre-allocation of tables to improve performance and decrease memory fragmentation

9 years agoMerge with merge merge merge
Matthew Wild [Fri, 27 Mar 2015 22:19:44 +0000 (22:19 +0000)]
Merge with merge merge merge

9 years agoMerge 0.9->0.10 (third time lucky)
Matthew Wild [Fri, 27 Mar 2015 22:11:58 +0000 (22:11 +0000)]
Merge 0.9->0.10 (third time lucky)

9 years agoMerge with merge
Kim Alvefur [Thu, 26 Mar 2015 23:28:16 +0000 (00:28 +0100)]
Merge with merge

9 years agoMerge 0.9->0.10 again
Kim Alvefur [Thu, 26 Mar 2015 23:27:29 +0000 (00:27 +0100)]
Merge 0.9->0.10 again

9 years agoMerge 0.9->0.10
Matthew Wild [Thu, 26 Mar 2015 16:48:39 +0000 (16:48 +0000)]
Merge 0.9->0.10

9 years agoTagging 0.9.8
Matthew Wild [Tue, 24 Mar 2015 19:12:04 +0000 (19:12 +0000)]
Tagging 0.9.8

9 years agomod_s2s: to/from attributes are required on s2s stream headers. Set them to '' when...
Matthew Wild [Tue, 24 Mar 2015 16:03:37 +0000 (16:03 +0000)]
mod_s2s: to/from attributes are required on s2s stream headers. Set them to '' when not available. Fixes #468.

9 years agosessionmanager: Return 'not-allowed' error instead of the non-existent 'already-bound...
Matthew Wild [Tue, 24 Mar 2015 15:57:46 +0000 (15:57 +0000)]
sessionmanager: Return 'not-allowed' error instead of the non-existent 'already-bound' error when client tries to bind a resource twice on the same stream (thanks Flow) fixes issue #484.

9 years agomod_http: Return a static string from module:http_url() when no ports are enabled...
Kim Alvefur [Mon, 23 Mar 2015 17:45:02 +0000 (18:45 +0100)]
mod_http: Return a static string from module:http_url() when no ports are enabled and log a warning

9 years agomod_http: Log a debug message when adding new http apps and warn if no http ports...
Kim Alvefur [Mon, 23 Mar 2015 17:44:12 +0000 (18:44 +0100)]
mod_http: Log a debug message when adding new http apps and warn if no http ports are enabled

9 years agoBackout 7726b627c3ea
Kim Alvefur [Mon, 23 Mar 2015 17:40:12 +0000 (18:40 +0100)]
Backout 7726b627c3ea

9 years agoutf8_sequences.txt: Oops
Matthew Wild [Mon, 23 Mar 2015 17:23:11 +0000 (17:23 +0000)]
utf8_sequences.txt: Oops

9 years agotests: Add UTF-8 validity tests
Matthew Wild [Mon, 23 Mar 2015 17:16:54 +0000 (17:16 +0000)]
tests: Add UTF-8 validity tests

9 years agoMerge with Zash
Matthew Wild [Mon, 23 Mar 2015 14:05:55 +0000 (14:05 +0000)]
Merge with Zash

9 years agoutil.encodings: Expose UTF-8 validation and length checking functions
Kim Alvefur [Mon, 23 Mar 2015 13:27:30 +0000 (14:27 +0100)]
util.encodings: Expose UTF-8 validation and length checking functions

9 years agoutil.encodings: Perform validation of UTF-8 strings before passing to libidn (Based...
Kim Alvefur [Mon, 23 Mar 2015 13:26:34 +0000 (14:26 +0100)]
util.encodings: Perform validation of UTF-8 strings before passing to libidn (Based on code from the utf8 library in Lua 5.3)

9 years agomod_http: Log event name when adding a HTTP app's hooks
Matthew Wild [Sat, 14 Mar 2015 22:39:23 +0000 (22:39 +0000)]
mod_http: Log event name when adding a HTTP app's hooks

9 years agonet.http.server: Log event name when firing a request event
Matthew Wild [Sat, 14 Mar 2015 22:39:03 +0000 (22:39 +0000)]
net.http.server: Log event name when firing a request event

9 years agoconfigure: Fix for commit cd0088c73daf - update LIBDIR if --prefix is set and --libdi...
Matthew Wild [Tue, 24 Feb 2015 15:19:20 +0000 (15:19 +0000)]
configure: Fix for commit cd0088c73daf - update LIBDIR if --prefix is set and --libdir isn't (thanks Medics)

9 years agomod_admin_telnet: Require util.pposix (fixes #471)
Matthew Wild [Fri, 20 Feb 2015 22:53:12 +0000 (22:53 +0000)]
mod_admin_telnet: Require util.pposix (fixes #471)

9 years agoutil.datamanager: Check that the global 'prosody' exists before using it (fixes nil...
Kim Alvefur [Fri, 20 Feb 2015 18:00:01 +0000 (19:00 +0100)]
util.datamanager: Check that the global 'prosody' exists before using it (fixes nil indexing in use outside of prosody)

9 years agoconfigure, Makefile: Add --libdir option to ./configure, allowing you to override...
Matthew Wild [Fri, 20 Feb 2015 15:51:05 +0000 (15:51 +0000)]
configure, Makefile: Add --libdir option to ./configure, allowing you to override the $PREFIX/lib/ default. Fixes #470.

9 years agoprosodyctl: Expand plugin paths and attempt to identify prosody-modules checkouts
Kim Alvefur [Wed, 21 Jan 2015 01:55:27 +0000 (02:55 +0100)]
prosodyctl: Expand plugin paths and attempt to identify prosody-modules checkouts

9 years agoprosodyctl: Use util.mercurial to identify hg repository and revision
Kim Alvefur [Wed, 21 Jan 2015 01:55:23 +0000 (02:55 +0100)]
prosodyctl: Use util.mercurial to identify hg repository and revision

9 years agoutil.mercurial: Utility functions for Mercurial repositories
Kim Alvefur [Wed, 21 Jan 2015 01:55:18 +0000 (02:55 +0100)]
util.mercurial: Utility functions for Mercurial repositories

9 years agostanza_router: Fix routing of 'error' IQs with multiple childs (thanks Pawel)
Kim Alvefur [Tue, 6 Jan 2015 16:39:47 +0000 (17:39 +0100)]
stanza_router: Fix routing of 'error' IQs with multiple childs (thanks Pawel)

9 years agonet.http.parser: Fix whitespace/indentation
Matthew Wild [Tue, 18 Nov 2014 17:40:37 +0000 (17:40 +0000)]
net.http.parser: Fix whitespace/indentation

9 years agonet.http.parser: Fix chunked encoding parsing across packet boundaries.
daurnimator [Mon, 10 Nov 2014 19:47:33 +0000 (14:47 -0500)]
net.http.parser: Fix chunked encoding parsing across packet boundaries.

9 years agonet.dns: Try next server if peer name can not be set (thanks wirehack7)
Kim Alvefur [Thu, 30 Oct 2014 11:28:07 +0000 (12:28 +0100)]
net.dns: Try next server if peer name can not be set (thanks wirehack7)

9 years agonet.dns: Return new socket from servfail
Kim Alvefur [Thu, 30 Oct 2014 11:10:15 +0000 (12:10 +0100)]
net.dns: Return new socket from servfail

9 years agonet.adns: Log peername recorded from wrapped setpeername instead of calling sock...
Kim Alvefur [Thu, 30 Oct 2014 11:08:05 +0000 (12:08 +0100)]
net.adns: Log peername recorded from wrapped setpeername instead of calling sock:getpeername, it exists and throws an error on unconnected sockets (thanks wirehack7)

9 years agonet.adns: Preserve error from setpeername
Kim Alvefur [Thu, 30 Oct 2014 11:05:24 +0000 (12:05 +0100)]
net.adns: Preserve error from setpeername

9 years agoTagging 0.9.7
Matthew Wild [Fri, 24 Oct 2014 22:23:02 +0000 (23:23 +0100)]
Tagging 0.9.7

9 years agoBackout changeset 6e67c73f730c: not a major fix and it breaks interop with at least...
Matthew Wild [Fri, 24 Oct 2014 22:20:06 +0000 (23:20 +0100)]
Backout changeset 6e67c73f730c: not a major fix and it breaks interop with at least Isode M-Link, and possibly standards, while it's not clear it actually fixes the original problem either.

9 years agoprosodyctl: Fix nil global access traceback in `prosodyctl about` (luarocks 2.2.0...
Waqas Hussain [Sun, 19 Oct 2014 07:05:49 +0000 (03:05 -0400)]
prosodyctl: Fix nil global access traceback in `prosodyctl about` (luarocks 2.2.0 no longer uses module())