aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2011-01-04 16:37:57 +0000
committerMatthew Wild <mwild1@gmail.com>2011-01-04 16:37:57 +0000
commit00524419cb1c35e6df4c16c6eec81cbabf6ccc96 (patch)
tree82c90d322d3e62d45a6d81f81062cc20867fc914
parentee8892b9e5975b338fc77b938c35a3a271005836 (diff)
downloadprosody-00524419cb1c35e6df4c16c6eec81cbabf6ccc96.tar.gz
prosody-00524419cb1c35e6df4c16c6eec81cbabf6ccc96.zip
net.adns: Log the DNS server that a query is sent to
-rw-r--r--net/adns.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/adns.lua b/net/adns.lua
index 2f7b6804..a3b07b09 100644
--- a/net/adns.lua
+++ b/net/adns.lua
@@ -78,7 +78,10 @@ function new_async_socket(sock, resolver)
handler.setpeername = function (_, ...) peername = (...); local ret = sock:setpeername(...); _:set_send(dummy_send); return ret; end
handler.connect = function (_, ...) return sock:connect(...) end
--handler.send = function (_, data) _:write(data); return _.sendbuffer and _.sendbuffer(); end
- handler.send = function (_, data) return sock:send(data); end
+ handler.send = function (_, data)
+ log("debug", "Sending DNS query to %s", sock:getpeername());
+ return sock:send(data);
+ end
return handler;
end