Software /
code /
prosody
Changeset
3990:764922062c38
net.adns: Log the DNS server that a query is sent to
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Tue, 04 Jan 2011 16:37:57 +0000 |
parents | 3989:84792db89336 |
children | 3991:2b86d7705f4e |
files | net/adns.lua |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/net/adns.lua Mon Jan 03 09:40:45 2011 +0100 +++ b/net/adns.lua Tue Jan 04 16:37:57 2011 +0000 @@ -78,7 +78,10 @@ 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