# HG changeset patch # User Kim Alvefur # Date 1575153219 -3600 # Node ID 676e6a1b23d4cb588c597caa9fea6cb6ad91c05b # Parent ae906d51e3d2f122e91349c344044e17be096b15 mod_s2s: Log from session logger Helps locating all messages related to a specific session diff -r ae906d51e3d2 -r 676e6a1b23d4 plugins/mod_s2s/mod_s2s.lua --- a/plugins/mod_s2s/mod_s2s.lua Sat Nov 30 23:29:15 2019 +0100 +++ b/plugins/mod_s2s/mod_s2s.lua Sat Nov 30 23:33:39 2019 +0100 @@ -764,7 +764,7 @@ if must_secure and (session.cert_chain_status ~= "valid" or session.cert_identity_status ~= "valid") then local reason = friendly_cert_error(session); - module:log("warn", "Forbidding insecure connection to/from %s because its certificate %s", host or session.ip or "(unknown host)", reason); + session.log("warn", "Forbidding insecure connection to/from %s because its certificate %s", host or session.ip or "(unknown host)", reason); -- XEP-0178 recommends closing outgoing connections without warning -- but does not give a rationale for this. -- In practice most cases are configuration mistakes or forgotten