Software /
code /
prosody
Comparison
plugins/mod_s2s/s2sout.lib.lua @ 5386:43059357b2f0
mod_s2s: Keep the dns answer object around a while so plugins can look at it
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 23 Mar 2013 23:30:13 +0100 |
parent | 5351:901ed253bbf7 |
child | 5388:f833d2188c16 |
comparison
equal
deleted
inserted
replaced
5385:d663483036db | 5386:43059357b2f0 |
---|---|
88 handle = adns.lookup(function (answer) | 88 handle = adns.lookup(function (answer) |
89 handle = nil; | 89 handle = nil; |
90 host_session.connecting = nil; | 90 host_session.connecting = nil; |
91 if answer and #answer > 0 then | 91 if answer and #answer > 0 then |
92 log("debug", "%s has SRV records, handling...", to_host); | 92 log("debug", "%s has SRV records, handling...", to_host); |
93 local srv_hosts = {}; | 93 local srv_hosts = { answer = answer }; |
94 host_session.srv_hosts = srv_hosts; | 94 host_session.srv_hosts = srv_hosts; |
95 for _, record in ipairs(answer) do | 95 for _, record in ipairs(answer) do |
96 t_insert(srv_hosts, record.srv); | 96 t_insert(srv_hosts, record.srv); |
97 end | 97 end |
98 if #srv_hosts == 1 and srv_hosts[1].target == "." then | 98 if #srv_hosts == 1 and srv_hosts[1].target == "." then |