# HG changeset patch # User Kim Alvefur # Date 1493200527 -7200 # Node ID 102e1ec8bee169355c23a13a69af26ff212e6656 # Parent c14513401d65a1c3f83f6820bdb1cd072d7f6dfc# Parent 6ddddfe05a745ba9684f1a40543147036e68f228 Merge 0.10->trunk diff -r c14513401d65 -r 102e1ec8bee1 configure --- a/configure Tue Apr 25 01:42:59 2017 +0200 +++ b/configure Wed Apr 26 11:55:27 2017 +0200 @@ -297,9 +297,15 @@ --cflags) CFLAGS="$value" ;; + --add-cflags) + CFLAGS="$CFLAGS $value" + ;; --ldflags) LDFLAGS="$value" ;; + --add-ldflags) + LDFLAGS="$LDFLAGS $value" + ;; --c-compiler) CC="$value" ;; diff -r c14513401d65 -r 102e1ec8bee1 plugins/mod_mam/mod_mam.lua --- a/plugins/mod_mam/mod_mam.lua Tue Apr 25 01:42:59 2017 +0200 +++ b/plugins/mod_mam/mod_mam.lua Wed Apr 26 11:55:27 2017 +0200 @@ -52,6 +52,8 @@ archive = module:require "fallback_archive"; end +local use_total = true; + local cleanup; -- Handle prefs. @@ -137,7 +139,7 @@ limit = qmax + 1; before = before; after = after; reverse = reverse; - total = true; + total = get_total; }); if not data then @@ -359,6 +361,10 @@ 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 diff -r c14513401d65 -r 102e1ec8bee1 plugins/mod_tls.lua --- a/plugins/mod_tls.lua Tue Apr 25 01:42:59 2017 +0200 +++ b/plugins/mod_tls.lua Wed Apr 26 11:55:27 2017 +0200 @@ -35,7 +35,8 @@ 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 @@ 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