Changeset

4056:9106dcd4815e

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 4055:f3adda1ed0df
children 4057:dac4a1b028a4
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