Software /
code /
prosody
Comparison
net/adns.lua @ 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 |
parent | 3956:32ec833c2edf |
child | 4103:c994524ef953 |
comparison
equal
deleted
inserted
replaced
3989:84792db89336 | 3990:764922062c38 |
---|---|
76 handler.settimeout = function () end | 76 handler.settimeout = function () end |
77 handler.setsockname = function (_, ...) return sock:setsockname(...); end | 77 handler.setsockname = function (_, ...) return sock:setsockname(...); end |
78 handler.setpeername = function (_, ...) peername = (...); local ret = sock:setpeername(...); _:set_send(dummy_send); return ret; end | 78 handler.setpeername = function (_, ...) peername = (...); local ret = sock:setpeername(...); _:set_send(dummy_send); return ret; end |
79 handler.connect = function (_, ...) return sock:connect(...) end | 79 handler.connect = function (_, ...) return sock:connect(...) end |
80 --handler.send = function (_, data) _:write(data); return _.sendbuffer and _.sendbuffer(); end | 80 --handler.send = function (_, data) _:write(data); return _.sendbuffer and _.sendbuffer(); end |
81 handler.send = function (_, data) return sock:send(data); end | 81 handler.send = function (_, data) |
82 log("debug", "Sending DNS query to %s", sock:getpeername()); | |
83 return sock:send(data); | |
84 end | |
82 return handler; | 85 return handler; |
83 end | 86 end |
84 | 87 |
85 dns.socket_wrapper_set(new_async_socket); | 88 dns.socket_wrapper_set(new_async_socket); |
86 | 89 |