Software /
code /
prosody
Diff
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 |
line wrap: on
line diff
--- a/net/adns.lua Sat Nov 08 12:28:49 2014 +0100 +++ b/net/adns.lua Sun Nov 09 20:30:04 2014 +0100 @@ -76,12 +76,11 @@ handler.settimeout = function () end handler.setsockname = function (_, ...) return sock:setsockname(...); end - handler.setpeername = function (_, ...) peername = (...); local ret = sock:setpeername(...); _:set_send(dummy_send); return ret; end + handler.setpeername = function (_, ...) peername = (...); local ret, err = sock:setpeername(...); _:set_send(dummy_send); return ret, err; end handler.connect = function (_, ...) return sock:connect(...) end --handler.send = function (_, data) _:write(data); return _.sendbuffer and _.sendbuffer(); end handler.send = function (_, data) - local getpeername = sock.getpeername; - log("debug", "Sending DNS query to %s", (getpeername and getpeername(sock)) or "<unconnected>"); + log("debug", "Sending DNS query to %s", peername); return sock:send(data); end return handler;