Software /
code /
prosody
Comparison
core/s2smanager.lua @ 739:1def06cd9311
Port to new server.lua, quite some changes, but I believe everything to be working
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sat, 17 Jan 2009 04:45:08 +0000 |
parent | 631:6957fe7b0313 |
child | 758:b1885732e979 |
comparison
equal
deleted
inserted
replaced
738:cf70342985df | 739:1def06cd9311 |
---|---|
29 local tostring, pairs, ipairs, getmetatable, print, newproxy, error, tonumber | 29 local tostring, pairs, ipairs, getmetatable, print, newproxy, error, tonumber |
30 = tostring, pairs, ipairs, getmetatable, print, newproxy, error, tonumber; | 30 = tostring, pairs, ipairs, getmetatable, print, newproxy, error, tonumber; |
31 | 31 |
32 local idna_to_ascii = require "util.encodings".idna.to_ascii; | 32 local idna_to_ascii = require "util.encodings".idna.to_ascii; |
33 local connlisteners_get = require "net.connlisteners".get; | 33 local connlisteners_get = require "net.connlisteners".get; |
34 local wraptlsclient = require "net.server".wraptlsclient; | 34 local wrapclient = require "net.server".wrapclient; |
35 local modulemanager = require "core.modulemanager"; | 35 local modulemanager = require "core.modulemanager"; |
36 local st = require "stanza"; | 36 local st = require "stanza"; |
37 local stanza = st.stanza; | 37 local stanza = st.stanza; |
38 | 38 |
39 local uuid_gen = require "util.uuid".generate; | 39 local uuid_gen = require "util.uuid".generate; |
194 log("warn", "s2s connect() failed: %s", err); | 194 log("warn", "s2s connect() failed: %s", err); |
195 return false; | 195 return false; |
196 end | 196 end |
197 | 197 |
198 local cl = connlisteners_get("xmppserver"); | 198 local cl = connlisteners_get("xmppserver"); |
199 conn = wraptlsclient(cl, conn, connect_host, connect_port, 0, cl.default_mode or 1, hosts[from_host].ssl_ctx ); | 199 conn = wrapclient(conn, connect_host, connect_port, cl, cl.default_mode or 1, hosts[from_host].ssl_ctx, false ); |
200 host_session.conn = conn; | 200 host_session.conn = conn; |
201 | 201 |
202 -- Register this outgoing connection so that xmppserver_listener knows about it | 202 -- Register this outgoing connection so that xmppserver_listener knows about it |
203 -- otherwise it will assume it is a new incoming connection | 203 -- otherwise it will assume it is a new incoming connection |
204 cl.register_outgoing(conn, host_session); | 204 cl.register_outgoing(conn, host_session); |