Software /
code /
prosody
Changeset
4575:e0c4ac7749a6
Merge backout
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 24 Feb 2012 16:25:45 +0000 |
parents | 4573:09255a10fdfa (diff) 4574:4c24bb949e73 (current diff) |
children | 4576:79c813c4ecc0 |
files | plugins/s2s/mod_s2s.lua |
diffstat | 2 files changed, 4 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/s2s/mod_s2s.lua Fri Feb 24 16:25:38 2012 +0000 +++ b/plugins/s2s/mod_s2s.lua Fri Feb 24 16:25:45 2012 +0000 @@ -192,7 +192,7 @@ if session.secure and not session.cert_chain_status then check_cert_status(session); end send("<?xml version='1.0'?>"); - send(stanza.stanza("stream:stream", { xmlns='jabber:server', ["xmlns:db"]='jabber:server:dialback', + send(st.stanza("stream:stream", { xmlns='jabber:server', ["xmlns:db"]='jabber:server:dialback', ["xmlns:stream"]='http://etherx.jabber.org/streams', id=session.streamid, from=session.to_host, to=session.from_host, version=(session.version > 0 and "1.0" or nil) }):top_tag()); if session.version >= 1.0 then local features = st.stanza("stream:features");
--- a/plugins/s2s/s2sout.lib.lua Fri Feb 24 16:25:38 2012 +0000 +++ b/plugins/s2s/s2sout.lib.lua Fri Feb 24 16:25:45 2012 +0000 @@ -8,18 +8,15 @@ --- Module containing all the logic for connecting to a remote server -local t_insert = table.insert; -local t_sort = table.sort; -local ipairs = ipairs; - 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 st = require "util.stanza"; local new_ip = require "util.ip".new_ip; local rfc3484_dest = require "util.rfc3484".destination; local socket = require "socket"; +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; @@ -30,6 +27,7 @@ local s2s_listener; + function s2sout.set_listener(listener) s2s_listener = listener; end