Software /
code /
prosody
Comparison
net/adns.lua @ 1715:3a5b6cd6b8c9
net.adns: Add some debug logging to help track down traceback
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Tue, 18 Aug 2009 15:59:11 +0100 |
parent | 1522:569d58d21612 |
child | 1788:45779d67c26c |
comparison
equal
deleted
inserted
replaced
1714:f05a29356269 | 1715:3a5b6cd6b8c9 |
---|---|
48 dns.feed(sock, data); | 48 dns.feed(sock, data); |
49 end | 49 end |
50 function listener.disconnect() | 50 function listener.disconnect() |
51 end | 51 end |
52 newconn.handler, newconn._socket = server.wrapclient(sock, "dns", 53, listener); | 52 newconn.handler, newconn._socket = server.wrapclient(sock, "dns", 53, listener); |
53 if not newconn.handler then | |
54 log("warn", "handler is nil"); | |
55 end | |
56 if not newconn._socket then | |
57 log("warn", "socket is nil"); | |
58 end | |
53 newconn.handler.settimeout = function () end | 59 newconn.handler.settimeout = function () end |
54 newconn.handler.setsockname = function (_, ...) return sock:setsockname(...); end | 60 newconn.handler.setsockname = function (_, ...) return sock:setsockname(...); end |
55 newconn.handler.setpeername = function (_, ...) local ret = sock:setpeername(...); _.setsend(sock.send); return ret; end | 61 newconn.handler.setpeername = function (_, ...) local ret = sock:setpeername(...); _.setsend(sock.send); return ret; end |
56 newconn.handler.connect = function (_, ...) return sock:connect(...) end | 62 newconn.handler.connect = function (_, ...) return sock:connect(...) end |
57 newconn.handler.send = function (_, data) _.write(data); return _.sendbuffer(); end | 63 newconn.handler.send = function (_, data) _.write(data); return _.sendbuffer(); end |