diff options
author | Matthew Wild <mwild1@gmail.com> | 2011-01-04 16:37:57 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2011-01-04 16:37:57 +0000 |
commit | 300438b5c70711500c4a3cc00d27d6563f729519 (patch) | |
tree | 29e744edfba4063ea2588fdafdc09b95473c52b4 /net | |
parent | 6bf334e359b1b44dfa1356a3b7257588dda68f14 (diff) | |
download | prosody-300438b5c70711500c4a3cc00d27d6563f729519.tar.gz prosody-300438b5c70711500c4a3cc00d27d6563f729519.zip |
net.adns: Log the DNS server that a query is sent to
Diffstat (limited to 'net')
-rw-r--r-- | net/adns.lua | 5 |
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 |