Changeset

4756:f8ddaaa08a8e

mod_s2s/s2sout.lib: Fix imports and some undefined variables
author Matthew Wild <mwild1@gmail.com>
date Sat, 28 Apr 2012 03:11:45 +0100
parents 4755:844019f369a5
children 4757:5fb68e68ba0b
files plugins/s2s/s2sout.lib.lua
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/s2s/s2sout.lib.lua	Sat Apr 28 03:06:14 2012 +0100
+++ b/plugins/s2s/s2sout.lib.lua	Sat Apr 28 03:11:45 2012 +0100
@@ -12,16 +12,18 @@
 local wrapclient = require "net.server".wrapclient;
 local initialize_filters = require "util.filters".initialize;
 local idna_to_ascii = require "util.encodings".idna.to_ascii;
-local add_task = require "util.timer".add_task;
 local new_ip = require "util.ip".new_ip;
 local rfc3484_dest = require "util.rfc3484".destination;
 local socket = require "socket";
+local adns = require "net.adns";
+local dns = require "net.dns";
 local t_insert, t_sort, ipairs = table.insert, table.sort, ipairs;
 local st = require "util.stanza";
 
-local s2s_new_outgoing = require "core.s2smanager".new_outgoing;
 local s2s_destroy_session = require "core.s2smanager".destroy_session;
 
+local log = module._log;
+
 local sources = {};
 
 local max_dns_depth = module:get_option_number("dns_max_depth", 3);
@@ -67,7 +69,7 @@
 				buffer = {};
 				host_session.send_buffer = buffer;
 			end
-			log("debug", "Buffering data on unconnected s2sout to %s", to_host);
+			log("debug", "Buffering data on unconnected s2sout to %s", tostring(host_session.to_host));
 			buffer[#buffer+1] = data;
 			log("debug", "Buffered item %d: %s", #buffer, tostring(data));
 		end