stanza_router: Localize hosts, full_sessions and bare_sessions, and take from the prosody object instead of _G

Sat, 17 Oct 2009 13:33:23 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Sat, 17 Oct 2009 13:33:23 +0100
changeset 1971
91420df04d5b
parent 1970
edab0c61fc02
child 1972
26d4b99ba211

stanza_router: Localize hosts, full_sessions and bare_sessions, and take from the prosody object instead of _G

core/stanza_router.lua file | annotate | diff | comparison | revisions
--- a/core/stanza_router.lua	Sat Oct 17 13:31:39 2009 +0100
+++ b/core/stanza_router.lua	Sat Oct 17 13:33:23 2009 +0100
@@ -8,7 +8,7 @@
 
 local log = require "util.logger".init("stanzarouter")
 
-local hosts = _G.hosts;
+local hosts = _G.prosody.hosts;
 local tostring = tostring;
 local st = require "util.stanza";
 local send_s2s = require "core.s2smanager".send_to_host;
@@ -17,6 +17,9 @@
 local jid_split = require "util.jid".split;
 local jid_prepped_split = require "util.jid".prepped_split;
 
+local full_sessions = _G.prosody.full_sessions;
+local bare_sessions = _G.prosody.bare_sessions;
+
 function core_process_stanza(origin, stanza)
 	(origin.log or log)("debug", "Received[%s]: %s", origin.type, stanza:top_tag())
 

mercurial