equal
deleted
inserted
replaced
297 local target_hosts = set.new(); |
297 local target_hosts = set.new(); |
298 if modules:contains("c2s") then |
298 if modules:contains("c2s") then |
299 local res = dns.lookup("_xmpp-client._tcp."..idna.to_ascii(host)..".", "SRV"); |
299 local res = dns.lookup("_xmpp-client._tcp."..idna.to_ascii(host)..".", "SRV"); |
300 if res then |
300 if res then |
301 for _, record in ipairs(res) do |
301 for _, record in ipairs(res) do |
|
302 if record.srv.target == "." then -- TODO is this an error if mod_c2s is enabled? |
|
303 print(" 'xmpp-client' service disabled by pointing to '.'"); -- FIXME Explain better what this is |
|
304 break; |
|
305 end |
302 target_hosts:add(record.srv.target); |
306 target_hosts:add(record.srv.target); |
303 if not c2s_ports:contains(record.srv.port) then |
307 if not c2s_ports:contains(record.srv.port) then |
304 print(" SRV target "..record.srv.target.." contains unknown client port: "..record.srv.port); |
308 print(" SRV target "..record.srv.target.." contains unknown client port: "..record.srv.port); |
305 end |
309 end |
306 end |
310 end |
315 end |
319 end |
316 if modules:contains("s2s") then |
320 if modules:contains("s2s") then |
317 local res = dns.lookup("_xmpp-server._tcp."..idna.to_ascii(host)..".", "SRV"); |
321 local res = dns.lookup("_xmpp-server._tcp."..idna.to_ascii(host)..".", "SRV"); |
318 if res then |
322 if res then |
319 for _, record in ipairs(res) do |
323 for _, record in ipairs(res) do |
|
324 if record.srv.target == "." then -- TODO Is this an error if mod_s2s is enabled? |
|
325 print(" 'xmpp-server' service disabled by pointing to '.'"); -- FIXME Explain better what this is |
|
326 break; |
|
327 end |
320 target_hosts:add(record.srv.target); |
328 target_hosts:add(record.srv.target); |
321 if not s2s_ports:contains(record.srv.port) then |
329 if not s2s_ports:contains(record.srv.port) then |
322 print(" SRV target "..record.srv.target.." contains unknown server port: "..record.srv.port); |
330 print(" SRV target "..record.srv.target.." contains unknown server port: "..record.srv.port); |
323 end |
331 end |
324 end |
332 end |