Diff

prosodyctl @ 7311:e9526dd3e8fc

prosodyctl: Only use host part of JIDs eg components that have node parts (thanks suzyo)
author Kim Alvefur <zash@zash.se>
date Tue, 22 Mar 2016 14:42:55 +0100
parent 7297:b34a42a10c9f
child 7313:316ca5c15255
child 7445:6d2038147d3d
line wrap: on
line diff
--- a/prosodyctl	Mon Mar 21 21:04:14 2016 +0000
+++ b/prosodyctl	Tue Mar 22 14:42:55 2016 +0100
@@ -1063,11 +1063,15 @@
 		
 		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");