Software /
code /
prosody
Comparison
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 |
comparison
equal
deleted
inserted
replaced
7309:471189342890 | 7311:e9526dd3e8fc |
---|---|
1061 c2s_srv_required, s2s_srv_required = true, true; | 1061 c2s_srv_required, s2s_srv_required = true, true; |
1062 end | 1062 end |
1063 | 1063 |
1064 local v6_supported = not not socket.tcp6; | 1064 local v6_supported = not not socket.tcp6; |
1065 | 1065 |
1066 for host, host_options in enabled_hosts() do | 1066 for jid, host_options in enabled_hosts() do |
1067 local all_targets_ok, some_targets_ok = true, false; | 1067 local all_targets_ok, some_targets_ok = true, false; |
1068 local node, host = jid_split(jid); | |
1068 | 1069 |
1069 local is_component = not not host_options.component_module; | 1070 local is_component = not not host_options.component_module; |
1070 print("Checking DNS for "..(is_component and "component" or "host").." "..host.."..."); | 1071 print("Checking DNS for "..(is_component and "component" or "host").." "..jid.."..."); |
1072 if node then | |
1073 print("Only the domain part ("..host..") is used in DNS.") | |
1074 end | |
1071 local target_hosts = set.new(); | 1075 local target_hosts = set.new(); |
1072 if not is_component then | 1076 if not is_component then |
1073 local res = dns.lookup("_xmpp-client._tcp."..idna.to_ascii(host)..".", "SRV"); | 1077 local res = dns.lookup("_xmpp-client._tcp."..idna.to_ascii(host)..".", "SRV"); |
1074 if res then | 1078 if res then |
1075 for _, record in ipairs(res) do | 1079 for _, record in ipairs(res) do |