aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2012-04-28 03:06:14 +0100
committerMatthew Wild <mwild1@gmail.com>2012-04-28 03:06:14 +0100
commit561bbc3a2ebe967de780c3a6c7cbf203b89f226a (patch)
treecc46a9208cf807e9615dd820668b3f66075d688a
parentddf88f4b38e6d760764c547407715380a55e511a (diff)
downloadprosody-561bbc3a2ebe967de780c3a6c7cbf203b89f226a.tar.gz
prosody-561bbc3a2ebe967de780c3a6c7cbf203b89f226a.zip
mod_s2s: Fix imports and remove some unused variables
-rw-r--r--plugins/s2s/mod_s2s.lua10
1 files changed, 7 insertions, 3 deletions
diff --git a/plugins/s2s/mod_s2s.lua b/plugins/s2s/mod_s2s.lua
index 478ed558..e40f35bd 100644
--- a/plugins/s2s/mod_s2s.lua
+++ b/plugins/s2s/mod_s2s.lua
@@ -8,6 +8,10 @@
module:set_global();
+local prosody = prosody;
+local hosts = prosody.hosts;
+local core_process_stanza = prosody.core_process_stanza;
+
local tostring, type = tostring, type;
local t_insert = table.insert;
local xpcall, traceback = xpcall, debug.traceback;
@@ -20,6 +24,7 @@ local new_xmpp_stream = require "util.xmppstream".new;
local s2s_new_incoming = require "core.s2smanager".new_incoming;
local s2s_new_outgoing = require "core.s2smanager".new_outgoing;
local s2s_destroy_session = require "core.s2smanager".destroy_session;
+local s2s_mark_connected = require "core.s2smanager".mark_connected;
local uuid_gen = require "util.uuid".generate;
local cert_verify_identity = require "util.x509".verify_identity;
@@ -41,7 +46,7 @@ local function bounce_sendq(session, reason)
local dummy = {
type = "s2sin";
send = function(s)
- (session.log or log)("error", "Replying to to an s2s error reply, please report this! Traceback: %s", get_traceback());
+ (session.log or log)("error", "Replying to to an s2s error reply, please report this! Traceback: %s", traceback());
end;
dummy = true;
};
@@ -81,7 +86,7 @@ module:hook("route/remote", function (event)
return true;
elseif host.type == "local" or host.type == "component" then
log("error", "Trying to send a stanza to ourselves??")
- log("error", "Traceback: %s", get_traceback());
+ log("error", "Traceback: %s", traceback());
log("error", "Stanza: %s", tostring(stanza));
return false;
else
@@ -442,7 +447,6 @@ function listener.onstatus(conn, status)
if status == "ssl-handshake-complete" then
local session = sessions[conn];
if session and session.direction == "outgoing" then
- local to_host, from_host = session.to_host, session.from_host;
session.log("debug", "Sending stream header...");
session:open_stream(session.from_host, session.to_host);
end