From 1dea93bfed984f7b3a7947571dfc6e1f6b348033 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Tue, 25 Apr 2017 21:46:46 +0200 Subject: configure: --add-cflags to amend $CFLAGS without replacing existing value(s) #858 --- configure | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configure b/configure index 08f631ee..a81c7eb9 100755 --- a/configure +++ b/configure @@ -297,6 +297,9 @@ do --cflags) CFLAGS="$value" ;; + --add-cflags) + CFLAGS="$CFLAGS $value" + ;; --ldflags) LDFLAGS="$value" ;; -- cgit v1.2.3 From beb3a577e21bfc434a9d62d0d2c54dce003acdb6 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Tue, 25 Apr 2017 21:48:24 +0200 Subject: configure: --add-ldflags to amend $LDFLAGS without overriding previous value #858 --- configure | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configure b/configure index a81c7eb9..63403738 100755 --- a/configure +++ b/configure @@ -303,6 +303,9 @@ do --ldflags) LDFLAGS="$value" ;; + --add-ldflags) + LDFLAGS="$LDFLAGS $value" + ;; --c-compiler) CC="$value" ;; -- cgit v1.2.3 From 1ad8af8bc20f84a2cac3394aa6255f1e52423289 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Tue, 25 Apr 2017 21:50:36 +0200 Subject: mod_tls: Rebuild SSL context objects on configuration reload - #701 --- plugins/mod_tls.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/mod_tls.lua b/plugins/mod_tls.lua index 48613b9a..029ddd1d 100644 --- a/plugins/mod_tls.lua +++ b/plugins/mod_tls.lua @@ -35,7 +35,8 @@ local host = hosts[module.host]; local ssl_ctx_c2s, ssl_ctx_s2sout, ssl_ctx_s2sin; local ssl_cfg_c2s, ssl_cfg_s2sout, ssl_cfg_s2sin; -do + +function module.load() local NULL, err = {}; local modhost = module.host; local parent = modhost:match("%.(.*)$"); @@ -61,6 +62,8 @@ do if not ssl_ctx_s2sin then module:log("error", "Error creating contexts for s2sin: %s", err); end end +module:hook_global("config-reloaded", module.load); + local function can_do_tls(session) if not session.conn.starttls then if not session.secure then -- cgit v1.2.3 From 4e955bb01926b7fafe8e3d892807833382e50634 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Wed, 26 Apr 2017 11:46:22 +0200 Subject: mod_mam: Don't ask the storage backend to count all items when expiry is disabled --- plugins/mod_mam/mod_mam.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins/mod_mam/mod_mam.lua b/plugins/mod_mam/mod_mam.lua index 0c35f43f..f46d3818 100644 --- a/plugins/mod_mam/mod_mam.lua +++ b/plugins/mod_mam/mod_mam.lua @@ -52,6 +52,8 @@ if archive.name == "null" or not archive.find then archive = module:require "fallback_archive"; end +local use_total = true; + local cleanup; -- Handle prefs. @@ -137,7 +139,7 @@ module:hook("iq-set/self/"..xmlns_mam..":query", function(event) limit = qmax + 1; before = before; after = after; reverse = reverse; - total = true; + total = get_total; }); if not data then @@ -359,6 +361,10 @@ if cleanup_after ~= "never" then end return math.random(cleanup_interval, cleanup_interval * 2); end); +else + -- Don't ask the backend to count the potentially unbounded number of items, + -- it'll get slow. + use_total = false; end -- Stanzas sent by local clients -- cgit v1.2.3