From f88b44d69994d5dae4b8e37a6e6799bbb1c19571 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Tue, 22 Mar 2016 14:42:55 +0100 Subject: prosodyctl: Only use host part of JIDs eg components that have node parts (thanks suzyo) --- prosodyctl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/prosodyctl b/prosodyctl index 7c8659fb..c8366faf 100755 --- a/prosodyctl +++ b/prosodyctl @@ -1063,11 +1063,15 @@ function commands.check(arg) local v6_supported = not not socket.tcp6; - for host, host_options in enabled_hosts() do + for jid, host_options in enabled_hosts() do local all_targets_ok, some_targets_ok = true, false; + local node, host = jid_split(jid); local is_component = not not host_options.component_module; - print("Checking DNS for "..(is_component and "component" or "host").." "..host.."..."); + print("Checking DNS for "..(is_component and "component" or "host").." "..jid.."..."); + if node then + print("Only the domain part ("..host..") is used in DNS.") + end local target_hosts = set.new(); if not is_component then local res = dns.lookup("_xmpp-client._tcp."..idna.to_ascii(host)..".", "SRV"); -- cgit v1.2.3 From c50a32df40853786330503ea52ffea6c040a212b Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Wed, 23 Mar 2016 12:17:28 +0000 Subject: util.sql: Charset should be innocent until proven guilty (initialize charset_ok to true), fixes bug introduced in 187ba2e9c012 --- util/sql.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/sql.lua b/util/sql.lua index f64e8e10..657acb79 100644 --- a/util/sql.lua +++ b/util/sql.lua @@ -328,7 +328,7 @@ function engine:set_encoding() -- to UTF-8 local ok, actual_charset = self:transaction(function () return self:select"SHOW SESSION VARIABLES LIKE 'character_set_client'"; end); - local charset_ok; + local charset_ok = true; for row in actual_charset do if row[2] ~= charset then log("error", "MySQL %s is actually %q (expected %q)", row[1], row[2], charset); -- cgit v1.2.3