Software /
code /
prosody
Comparison
net/adns.lua @ 6510:8273236a995f
Merge 0.9 -> 0.10
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 09 Nov 2014 20:30:04 +0100 |
parent | 6289:a29cc79295e6 |
parent | 6507:84ca02c6a47e |
child | 6780:647adfd8f738 |
comparison
equal
deleted
inserted
replaced
6505:2dc8dbd0940e | 6510:8273236a995f |
---|---|
74 return nil, err; | 74 return nil, err; |
75 end | 75 end |
76 | 76 |
77 handler.settimeout = function () end | 77 handler.settimeout = function () end |
78 handler.setsockname = function (_, ...) return sock:setsockname(...); end | 78 handler.setsockname = function (_, ...) return sock:setsockname(...); end |
79 handler.setpeername = function (_, ...) peername = (...); local ret = sock:setpeername(...); _:set_send(dummy_send); return ret; end | 79 handler.setpeername = function (_, ...) peername = (...); local ret, err = sock:setpeername(...); _:set_send(dummy_send); return ret, err; end |
80 handler.connect = function (_, ...) return sock:connect(...) end | 80 handler.connect = function (_, ...) return sock:connect(...) end |
81 --handler.send = function (_, data) _:write(data); return _.sendbuffer and _.sendbuffer(); end | 81 --handler.send = function (_, data) _:write(data); return _.sendbuffer and _.sendbuffer(); end |
82 handler.send = function (_, data) | 82 handler.send = function (_, data) |
83 local getpeername = sock.getpeername; | 83 log("debug", "Sending DNS query to %s", peername); |
84 log("debug", "Sending DNS query to %s", (getpeername and getpeername(sock)) or "<unconnected>"); | |
85 return sock:send(data); | 84 return sock:send(data); |
86 end | 85 end |
87 return handler; | 86 return handler; |
88 end | 87 end |
89 | 88 |